Course and Unit Number showing

Home Forums Legacy Support Support queries How-to & Troubleshooting Course and Unit Number showing

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #209400
    livetrainingbd
    Participant
    Dear I have created 3 statistics section . Course Number , Instructor Number and Video Number. https://imgur.com/a/oBR3dxW Among them I will add manually Course Number , Instructor Number . Now I need to automatically show Unit number only in this video Number Box.   Please provide me sufficient code or any short methods.
    #209591
    logan
    Member
    Hey there, Please paste this snippets in your wp-admin >> plugins >> editor >> wplms-customizer plugin >> wplms-customizer.php  function logan_total_posts() { $total = wp_count_posts('quiz')->publish; return $total; } add_shortcode('total_quiz_count','logan_total_posts'); then add this shortcode in your text editor [total_quiz_count]
    #209653
    livetrainingbd
    Participant
    Dear   It showing quiz number. I want to show unit number. Please give me code for unit number.
    #209720
    logan
    Member

    Hey there,

    Please paste this snippets in your wp-admin >> plugins >> editor >> wplms-customizer plugin >> wplms-customizer.php 

    function logan_total_posts() {

    $total = wp_count_posts('unit')->publish;

    return $total;

    }

    add_shortcode('total_unit_count','logan_total_posts');

    then add this shortcode in your text editor [total_unit_count]


    if you want for course. then change all unit in this code as course.
    #209734
    livetrainingbd
    Participant
    Thanks This code is working. But I'm facing some problem with CSS. I want to replace this 5 with short code. 5 in manual typing by us. : https://snag.gy/cwh9Gz.jpg   My code code for whole design: Our Professional Courses Be your own Boss   Join With Our Great Courses [one_third] [number_counter min="0" max="1" delay="3" increment="15"] <span style="color: #ffffff;">Courses</span> [/one_third]</h5> <h5>[one_third] [one_third] [number_counter min="0" max="1" delay="3" increment="15"] <span style="color: #ffffff;">Instructors</span> [/one_third]</h5> <h5>[one_third] [one_third] [number_counter min="0" max="5" delay="3" increment="15"] <span style="color: #ffffff;">Videos</span> [/one_third] How to use my shrotcode: If i use my shortcode : [one_third] [number_counter min="0" max="5" delay="3" increment="15"] [total_unit_count] Videos[/one_third] It losses my css. Please help me.  
    #209866
    logan
    Member
    Hello, there is a code limitation, you cant use counter with this shortcode. this will generate only a static no. that will not run a counter. either use false value for videos with a counter or use the shortcode without counter.
    #210155
    livetrainingbd
    Participant
    Dear I know This 5 is static number. Now I want to know,   How to use shortcode instead of this 5 in <span style="color: #4b4d4d; font-family: Lato; font-size: 14px;">max="5".</span>   Please help
    #210205
    logan
    Member
    I am sorry that is not feasible as I stated above; You can't write something like [number_counter min="0" max="5" delay="3" increment="[total_unit_count]"]
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Course and Unit Number showing’ is closed to new replies.