Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #125677
    skynet
    Participant

    Hello great Catchthemes team i want to insert the last update date of posts on my blog and i follow the first method here http://devotepress.com/tutorials-hacks/display-last-updated-date-wordpress/
    when i add this code (as described on devotepress) on my functions.php i get error 500 on my blog, simply this code broke the blog with catchbox pro 4.9.3 i get blog back with backup of functions.php

    is there any method to put this option on catchbox pro and make it working in the next theme version? Maybe an option to add or remove “last updated post”. I think its a great idea for all users to see updated post expecially when you have so much readers and you update article 2 times a month like me. It is difficult to keep track of updated articles and having this option to show you when you have modified an article the last time would make blogging so much easier.

    #125678
    skynet
    Participant

    PS: when i try to add the code on the forum “here” “Method 1: Display Last Updated Date before Post Content” http://devotepress.com/tutorials-hacks/display-last-updated-date-wordpress/
    and try to post it i get blocked here in the forum, maybe something is wrong with the code or some forum protection? https://www.dropbox.com/s/6q4x3eltaouhykf/Screenshot%202017-11-08%2000.01.25.png?dl=0

    #125697
    tikaram
    Participant

    @skynet : Download catch box pro child theme from the following link and add the following code to the functions.php file of your child theme.

    function wpb_last_updated_date( $content ) {
    	$custom_content = '';
    	$u_time = get_the_time('U');
    	$u_modified_time = get_the_modified_time('U');
    	if ($u_modified_time >=$u_time + 86400) {
    	$updated_date = get_the_modified_time('F jS, Y');
    	$updated_time = get_the_modified_time('h:i a');
    	$custom_content .= '<p class="last-updated">Last updated on '. $updated_date . ' at '. $updated_time .' '.'</p>';
    }
     	$custom_content .= $content;
    	 return $custom_content;
    }
    add_filter( 'the_content', 'wpb_last_updated_date' );

    Let me know if you have any further issues.

    Regards,
    Tikaram

    #125713
    skynet
    Participant

    Hello tikaram, i have to upload this file where? on FTP –> wp-content –> themes?

    PS: If i don’t want to use child theme, is there any way to add this option to “on/off” button in the future catchbox pro update? It would be a great for all users i dont know if easy to implement or no.

    #125735
    skynet
    Participant

    Update: i installed child theme and activated it and broke all my blog with standard catchbox pro functions and layout. So i think best idea is to wait an option for this feature maybe in the future.

    #125743
    Sakin
    Keymaster

    @skynet: Ok we will add that in next version update. Thanks 🙂

    #125745
    skynet
    Participant

    Thank you so much @Sakin 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Last update date of posts + Suggestion’ is closed to new replies.