Bring Your Business to Life › Support › Popular Widget › show data, hook problems
Viewing 4 posts - 1 through 4 (of 4 total)
- AuthorPosts
- March 10, 2015 at 3:39 am #256076rhadminParticipant
Hi
Could you please explain for those less experienced with programming how to use the hook to display the data of each post in the popular widget?
Best
RHMarch 10, 2015 at 3:40 am #256080rhadminParticipantI mean the DATE of course. sorry
March 11, 2015 at 10:19 pm #256965Xpark MediaKeymasterIt depends if you want to affect all tabs or just one. Here is the code to affect all tabs. Remove lines of code as needed. You will need to add the code in a plugin or the functions.php file in your theme.
if you want to display the date after the title use:
function add_date_after_title( $title, $post ){ return $title .= get_the_time( '', $post->ID ); } add_filter('pop_recent_title', 'add_date_after_title',10, 2); add_filter('pop_commented_title', 'add_date_after_title',10, 2); add_filter('pop_viewed_title', 'add_date_after_title',10, 2);
April 30, 2015 at 1:18 am #282421lilymillParticipantHi!
I need to show data too, where do I have to add the code above in the plugin functions.php file?Thank you!
L - AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.