Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1024625
    Almusan
    Participant

    How can i remove the date and updated date from a PAGE?

    Thanks

    #1025203
    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    Thanks.

    #1025359
    Almusan
    Participant
    This reply has been marked as private.
    #1025410
    Rahul
    Moderator

    Hey There,

    Can you link us to the page from where you want to remove the date?

    Thanks

    #1025643
    Almusan
    Participant

    Is the main page. A person can´t see it but when when see the code (ctrl+u) we can see it: span class=”updated”>

    #1026260
    Rue Nel
    Moderator

    Hello There,

    Thank you for the clarifications!

    After investigation, I found out that you have added a custom function in your parent theme’s functions.php file which is not recommend. Since what you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Once you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.

    //add hatom data
    function add_suf_hatom_data($content) {
        $t = get_the_modified_time('F jS, Y');
        $author = get_the_author();
        $title = get_the_title();
    	if ( is_single() || is_archive() ) {
            $content .= '<div class="hatom-extra" style="display:none;visibility:hidden;"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>';
        }
        return $content;
        }
    add_filter('the_content', 'add_suf_hatom_data');
    // =============================================================================

    Hope this helps. Kindly let us know.

  • <script> jQuery(function($){ $("#no-reply-1024625 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>