Viewing 8 replies - 16 through 23 (of 23 total)
  • Ok. Let’s do it the proper way then.

    In your theme, open this file:

    lib/functions/utility.php

    You will find this piece of code:

    /** Retina Post Author */
    function retina_post_author() {
    
       $output = sprintf( '%3$s<span class="entry-author author vcard"><a href="%1$s" title="'. __( 'by %2$s', 'retina' ) .'" rel="author">%2$s</a></span>', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_html( get_the_author() ), retina_entry_meta_sep() );
       return $output;
    
    }

    So just comment out (//) these two lines and you’ll get this:

    /** Retina Post Author */
    function retina_post_author() {
    
       //$output = sprintf( '%3$s<span class="entry-author author vcard"><a href="%1$s" title="'. __( 'by %2$s', 'retina' ) .'" rel="author">%2$s</a></span>', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_html( get_the_author() ), retina_entry_meta_sep() );
       //return $output;
    
    }

    Done! You don’t need my plugin anymore…

    If you still want to use my plugin so you can show/hide the author in specific pages, then do this:

    Again, in lib/functions/utility.php, replace the original code (above) with this:

    /** Retina Post Author */
    function retina_post_author() {
    
    		$output = sprintf( '<span class="entry-meta-sep author-dot"> &sdot; </span><span class="entry-author author vcard"><a href="%1$s" title="'. __( 'by %2$s', 'retina' ) .'" rel="author">%2$s</a></span>', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_html( get_the_author() ) );
    		return $output;
    
    }

    Notice the <span class="entry-meta-sep author-dot"> &sdot; </span>?
    Then in the plugin settings use this regular expression:

    <span class="entry-meta-sep author-dot"(.*?)/span>

    I love your plugin! It works great to hide the author name but I’ve tried both of your above solutions to hide the word “by” with no success. I’m using the Canvas theme. I’m new to WordPress and still learning. Hope you can help me.

    Hello!

    There are 2 ways of hiding the “By” word.

    1st Regular Expression

    Got to the plugin settings and near the bottom of the page fill in these:

    The Parent Classes: post-meta
    The Regular Expressions: By;by

    (When copy pasting be careful NOT to include spaces)

    2nd CSS

    Go to Appearance -> Editor.
    Then scroll to the bottom of the file, and place the cursor in a new line at the very bottom. Then paste the following:

    .post-meta > span:first-child {display:none;}

    Hye!!

    I am using sensitive theme. its hiding author name but still left with “/by” . How to remove it tried using parent and regulat regular expressions. Site link is as below

    https://ezsolutionspk.net/public_html/demosite/

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    haskee74 Per the forum welcome please post your own topic.

    Your problem has nothing to do with this one.

    Hi,

    I’m also using your plugin on the ENFOLD theme from Kriesi.
    See https://www.accountantskantoorlotz.nl
    But I can not remove the word BY in the posts
    Could you help me?

    Thank you!

    Hi,

    I am using your plugin in the new site I’m building for my magazine. Like others, I cannot get rid of the “by” word in the byline. I am using Magazine Pro Theme: https://my.studiopress.com/themes/magazine/

    My website is currently set up with Joomla and we are switching it over to wordpress. The wordpress version of the site can be found here:

    https://alcoholmanac.com/wp/

    Any help would be greatly appreciate.

    Cheers!

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘how to remove the "by" word’ is closed to new replies.