Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1335361
    Chgrim
    Participant

    Hi,

    I needed to add the updated by date but I didn’t want it visible so I used the code

    // Fix "Missing Author" and "Missing Updated" issue - START
    // =============================================================================
    add_filter( 'the_content', 'custom_author_code');
    
    function custom_author_code($content) {
       if (is_singular() || is_single()) {
          return $content . 
          '<div class="hatom-extra hidden"><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></div>' ;
       } else {
          return $content;
       }
    }
    // =============================================================================

    This worked great for one of my sites but the same code on my other site is still showing the updated information
    example : https://www.couponsuck.com/fashionstash-promo-code/

    What do I need to do to keep that info and have it hidden on the page.

    Also how do I have the about the author element without using cornerstone?

    Thanks
    Chris

    #1335553
    Jade
    Moderator

    Hi Chris,

    To hide the info, please add this in the custom CSS:

    .hidden {
        display: none;
    }

    Then you may use the author shortcode. Please refer to this link: http://demo.theme.co/integrity-1/shortcodes/author/

    Hope this helps.

    #1335716
    Chgrim
    Participant

    That worked!
    thanks so much!!

    #1335843
    Jade
    Moderator

    You’re most welcome.

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