WordPress.org

Ready to get started?Download WordPress

Forums

Show Hide Author
how to remove the "by" word (24 posts)

  1. carolinah7
    Member
    Posted 1 year ago #

    can you please tell me how to remove the word "by" after author name is hidden? Thank you so much!

    http://wordpress.org/extend/plugins/show-hide-author/

  2. mspyratos
    Member
    Plugin Author

    Posted 1 year ago #

    Can you please share with me your theme's name or even better a link to your website? If you want send them by email.

    Thank you

  3. speed101
    Member
    Posted 1 year ago #

    Hi I downloaded your plugin but Im left with a "dash" symbol after the date. How to remove that please? I do not know coding so can you please explain in a simple way? My theme is wp-clearphoto and site: http://www.euro-freelancers.eu

  4. mspyratos
    Member
    Plugin Author

    Posted 1 year ago #

    Hello speed101,
    I just updated the plugin to support your theme too. Please install the updated plugin and let me know if it works.

  5. speed101
    Member
    Posted 1 year ago #

    Thank you. I installed the update but it is still the same. I cleared the cache and refreshed several times but still it does not work. What else could I do?

  6. mspyratos
    Member
    Plugin Author

    Posted 1 year ago #

    It would help me a lot if you could give me access to the admin page of your wordpress website. My email is: m.spyratos@gmail.com

  7. chris8008
    Member
    Posted 1 year ago #

    Thank you for your great plugin. I'm having the same issue with the "by" still showing. I've read your instructions but I know little to nothing about using code. I'm using the current version of Weaver II Pro. Here's a link to a post on the site with the "by" visible:

  8. mspyratos
    Member
    Plugin Author

    Posted 1 year ago #

    Hello chris8008.

    I don't see the link. Try this:
    Go to show hide author settings page and near the bottom of the page you will find the section "Advanced: Hide the "by" word".

    Fill in the following:

    The parent classes: by-author
    The regular expressions: <span class="sep"(.*?)/span>

    This will remove the line <span class="sep"> by </span> from inside the span with class by-author, as shown here:

    <span class="by-author">
    <span class="sep"> by </span>
    <span class="author vcard">...</span>
    </span>
  9. chris8008
    Member
    Posted 1 year ago #

    I entered those two lines in the two fields:
    The parent classes: by-author
    The regular expressions: <span class="sep"(.*?)/span>

    And it got rid of the by in the posted by line. There's still a by in the category line: This entry was posted in (category) by

    Sorry. My link didn't post last time. I'll just paste it in this time without trying to make it a live link:
    http://cmacneil.com/art/2005/05/23/red-house-no-18/

  10. mspyratos
    Member
    Plugin Author

    Posted 1 year ago #

    Oh. Ok!
    Then add these values:

    The parent classes: by-author;entry-utility
    The regular expressions: <span class="sep"(.*?)/span>;by <a(.*?)/a>

  11. chris8008
    Member
    Posted 1 year ago #

    That worked great. Thanks so much!

  12. 971menu
    Member
    Posted 11 months ago #

    Hi,
    Thanks for a cool plugin. It works as advertised, but when I activate it, I'm left with a period after the post date. I tried following your instructions, but can't seem to work it out. Here is, I think, the relevant code:

    ------------------------------
    <div class="entry-meta">
    <?php echo retina_post_date() . retina_post_comments() . retina_post_author() . retina_post_sticky() . retina_post_edit_link(); ?>
    </div><!-- .entry-meta -->
    ------------------------------

    What should I place in the parent class and regex fields of your plugin to get rid of the period?

    Thanks a lot.

  13. mspyratos
    Member
    Plugin Author

    Posted 11 months ago #

    Hello!

    I can't help you with the code you provided.
    Please let me know the name of the theme that you are using and/or a link to your website.

    You could try to open the functions.php file in your theme's folder and search for retina_post_date. Probably you will find the text that you need to remove...

  14. 971menu
    Member
    Posted 11 months ago #

    Thank you for the response.

    This is the theme:
    http://wordpress.org/themes/retina

    And my site is at capefearreview.com

    Thanks for your help.

  15. mspyratos
    Member
    Plugin Author

    Posted 11 months ago #

    Ok... So here is the HTML on your website:

    <div class="entry-meta">
       <span title="August 31, 2013 6:13 am" class="entry-date">
          <a rel="bookmark" title="Pepper Pot" href="http://capefearreview.com/?p=31">August 31, 2013 6:13 am</a><br />
       </span>
       <span class="entry-meta-sep"> ⋅ </span>
       <span class="entry-author author vcard">
          <a rel="author" title="by " href=""></a>
       </span>
    </div>

    So to remove the dot, go to the plugin settings and add near the bottom:

    The classes: entry-meta
    The regular: <span class="entry-meta-sep"(.*?)/span>

  16. 971menu
    Member
    Posted 11 months ago #

    I still can't get it to work. I did notice that the dot isn't actually a period--it's in the middle, rather than at the bottom. I tried just copy-pasting it in place of the period in your code, but no dice. Is it because it's a special character? Also, are the spaces important?

  17. mspyratos
    Member
    Plugin Author

    Posted 11 months ago #

    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...

  18. mspyratos
    Member
    Plugin Author

    Posted 11 months ago #

    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>

  19. flexokatie
    Member
    Posted 9 months ago #

    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.

  20. mspyratos
    Member
    Plugin Author

    Posted 9 months ago #

    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;}

  21. haskee74
    Member
    Posted 9 months ago #

    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

    http://ezsolutionspk.net/public_html/demosite/

  22. haskee74 Per the forum welcome please post your own topic.

    Your problem has nothing to do with this one.

  23. studioinktvis
    Member
    Posted 7 months ago #

    Hi,

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

    Thank you!

  24. bpwest21
    Member
    Posted 7 months ago #

    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: http://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:

    http://alcoholmanac.com/wp/

    Any help would be greatly appreciate.

    Cheers!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.