Remove specific Author when listing/displaying Posts

Posted in: Newspaper
Post count: 55

Hi,

I would like to know how can we stop displaying a specific user (for example, Admin) when listing ou displaying posts?

My blog has many posts from Admin and I do not want to display the admin name or link.

I would like to see the admin posts without mentioning the author everywhere in the site.

Thank you,

Post count: 555

you can turn off that in ur theme settings,but it depends on ur layout that you choose as well,i know blog layout show the author etc..

Post count: 55

Hi Steven,

We cannot turn off for a specific author. I am looking for the conditional coding, because it is a multi author blog.

Thank you anyways.

Post count: 555

Choose a layout that don’t show that like what i done… check my site http://jahliveradio.com

Post count: 55

Steven, let me clarify, I need to show ALL authors, but the admin.

Thank you,

Post count: 555

well that’s not as easy unless you do some editing in the code are find a plugin that can do that…

You can change the admin name to something else in ur profile if the name is showing as admin..

Post count: 55

Yep, see above:

“I am looking for the conditional coding, because it is a multi author blog.”

Thank you!

Anyone could help me with the code?

Post count: 555

Here i found a plugin that should do what u need…

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

not sure what this one do but you can try this other plugin and see if it work for you as well

http://wordpress.org/plugins/post-author/

Post count: 55

Steven, it’s a multi blog with 65,000 authors and 40,000 pages.

This plugin unfortunately can’t handle it.

Thank you anyways.

Anyone has an idea how to start the hook for the conditional coding?

Post count: 555

hmmm cool..btw that’s lot ppl good luck

Post count: 6600

Hi,

Add this code to the loop-single.php file like this: http://screencast.com/t/ELXmZQpHSQ

<?php
$author_cx = get_the_author();
if ($author_cx != 'admin'){
echo $td_mod_single->get_author_box();
}
?>

Thank you

  • This reply was modified 12 years by Lucian.
  • This reply was modified 12 years by Lucian.
Post count: 55

Hi Lucian, thank you.

I did it for the loop-single.php and worked like this:

if ( 1 !== get_the_author_meta( ‘ID’ ) ) {
echo $td_mod_single->get_author_box();
}

Where should I add the same conditional to stop listing everywhere in the site like on archives.php, search.php etc?

Post count: 1291

Hi,

If you enabled the author on modules (by uncommenting the line) you have to apply the same condition on each module – http://screencast.com/t/qz9w3P2tzQ6w
Including module search – http://screencast.com/t/qhNYcStfq

Thank you, Emil G.

Post count: 55

Emil, can I make this change using the child theme files?

Or should I do in the parent theme files?

Thank you.

Post count: 3343

Hi,
The module should work to be edited via Child theme. Make a try.

Thanks for the message!

Post count: 55

Thank you.

Viewing 16 posts - 1 through 16 (of 16 total)
You must be logged in to reply to this topic.