Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › Course and Unit Number showing
- This topic has 7 replies, 2 voices, and was last updated 4 years, 11 months ago by logan.
Viewing 8 posts - 1 through 8 (of 8 total)
-
AuthorPosts
-
May 16, 2019 at 11:51 am #209400livetrainingbdParticipantDear 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.May 17, 2019 at 11:01 am #209591loganMemberHey 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]May 17, 2019 at 4:53 pm #209653livetrainingbdParticipantDear It showing quiz number. I want to show unit number. Please give me code for unit number.May 18, 2019 at 10:41 am #209720loganMember
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.May 18, 2019 at 12:35 pm #209734livetrainingbdParticipantThanks 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.May 20, 2019 at 8:10 am #209866loganMemberHello, 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.May 21, 2019 at 10:14 pm #210155livetrainingbdParticipantDear 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 helpMay 22, 2019 at 8:04 am #210205loganMemberI 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]"] -
AuthorPosts
Viewing 8 posts - 1 through 8 (of 8 total)
- The topic ‘Course and Unit Number showing’ is closed to new replies.