Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #901888
    cjerryme
    Participant

    Hi. the code below has partially fixed the errors:

    add_filter(‘get_the_excerpt’, ‘modified_date_updated_excerpt’);
    function modified_date_updated_excerpt( $excerpt ) {
    if ( !is_single() || !is_singular() ) {
    return $excerpt . ‘<br><div class=”hatom-extra hidden” style=”display: none;”><span class=”title”>’. get_the_title() .'</span> was last modified: <span class=”updated”> ‘. get_the_modified_time(‘F jS, Y’) .'</span> by <span class=”author vcard”><span class=”fn”>’. get_the_author() .'</span></span><br><br></div>’;
    } else {
    return $excerpt;
    }
    }

    add_filter(‘the_content’, ‘modified_date_updated_content’);
    function modified_date_updated_content( $content ) {
    if ( !is_singular( ‘x-portfolio’ ) ) {
    return $content . ‘<br><div class=”hatom-extra hidden” style=”display: none;”><span class=”entry-title”>’. get_the_title() .'</span> was last modified: <span class=”updated”> ‘. get_the_modified_time(‘F jS, Y’) .'</span> by <span class=”author vcard”><span class=”fn”>’. get_the_author() .'</span></span><br><br></div>’;
    } else {
    return $content;
    }
    }

    Unresolved Issues:

    1. HOWEVER, this does not fix the issue on category pages. Google still reports that author and updated information are missing from category pages. Is there a way to apply the code in category pages as well?

    2. The code makes the data invisible to human eye. However in pages where the recent posts shortcode is placed, the data are displayed. Is it possible to set the data hidden also on such pages?

    Thanks.

    #902816
    Jade
    Moderator

    Hi Jerry,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #903061
    cjerryme
    Participant
    This reply has been marked as private.
    #903868
    Paul R
    Moderator

    Hi,

    1. I checked your category pages and I can see the code being added to it.

    http://screencast.com/t/x7tmIFIC

    Can you try checking again.

    2. Can you provide us the url of the page where we can see the issue.

    I checked on the homepage and it is not showing up.

    http://screencast.com/t/1Feh1CSNqCW

    Thanks

    #904015
    cjerryme
    Participant
    This reply has been marked as private.
    #904997
    Rue Nel
    Moderator

    Hello There,

    It is not invisible because the html codes where strip off. Please have your code updated and use this instead:

    add_filter('the_excerpt', 'modified_date_updated_excerpt');
    function modified_date_updated_excerpt( $excerpt ) {
    	if ( !is_single() || !is_singular() ) {
    		return $excerpt . '<br><div class="hatom-extra hidden" style="display: none;"><span class="title">'. get_the_title() .'</span> was last modified: <span class="updated"> '. get_the_modified_time('F jS, Y') .'</span> by <span class="author vcard"><span class="fn">'. get_the_author() .'</span></span><br><br></div>';
    	} else {
    		return $excerpt;
    	}
    }

    Please let us know if this works out for you.

    #905042
    cjerryme
    Participant

    hi.

    It works.

    Thanks.

    🙂

    #905833
    Darshana
    Moderator

    Glad we were able to help 🙂

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