Community Forums › Forums › Archived Forums › General Discussion › to remove the post author
Tagged: .post-info, post author, remove author
- This topic has 10 replies, 2 voices, and was last updated 7 years, 2 months ago by
Brad Dalton.
-
AuthorPosts
-
July 6, 2016 at 10:39 am #188965
smenegassi
ParticipantHi,
I am working on a theme based on Genesis Sample theme.
I want to remove the author's name from posts on certains pages.
I've tryed what I found on Stduo press snoppets ://* Customize the entry meta in the entry header (requires HTML5 theme support)
add_filter( 'genesis_post_info', 'sp_post_info_filter' );
function sp_post_info_filter($post_info) {
$post_info = ' [post_comments] [post_edit]';
return $post_info;
}I am really new to Genesis and WordPress but I really want to learn. Any cues ? Thanks evrybody
July 6, 2016 at 11:10 am #188966Brad Dalton
ParticipantThat will work. Add it to your functions file using File Manager in Cpanel or FTP with a code editor.
Which pages do you want to remove it from because that code removes it globally.
July 7, 2016 at 12:49 am #188998smenegassi
ParticipantHi, thanks.
I am doing that. I use Brackets and Transmit. And it does not work !
In this site there is blog with comments, and there the author can be kwown but in a space called Petites Annonces, the client would like that we couldn't see the author of the add. God knows why ! It a s kind of obsession. ๐
I think I can create a article- page model so to remove the author only where I want.
I'll try again. there i
thanksJuly 7, 2016 at 1:27 am #189002smenegassi
ParticipantHi Braddalton,
I must be doing something very wrong. When I triy to see the filters on may page with the plugin G Hook Guide, it doesn't give me the genesis_post_info filter. I guess that's why it doens't work....
I keep searching,
๐
thanks for your attention,
sergioJuly 7, 2016 at 5:43 am #189005Brad Dalton
ParticipantAre you referring to the:
1. author box in the entry footer
or
2. author archive link in the entry header?
1. One shows a avatar of the author and their Bio.
2. The other is only a link to the authors archive page.
July 7, 2016 at 5:55 am #189007smenegassi
ParticipantI believe I mean the author archive link in the entry header.
GHookGuide says :genesis_entry_header
30 juin 2016 By louis Laisser un commentaire (รditer)
genesis_entry_content
July 7, 2016 at 6:08 am #189009Brad Dalton
ParticipantHere's the code
To remove the link from specific pages/posts, you can add conditional tags after the function.
Also note: If you have the Genesis Simple Edits plugin active, adding code which uses the same hook may not work. In your case, its better to use code rather than the plugin.
July 7, 2016 at 6:33 am #189010smenegassi
ParticipantHi, thanks again.
I don't want to abuse with my.... say lack of knwologed.... but why I can't see the filter hook name when I ask with GHooks ?
I believe I have somthing wrong there on my set ups.; because it is not working....thanks,
s.
July 7, 2016 at 6:47 am #189012Brad Dalton
ParticipantPlease add the code to your child themes functions file using a code editor.
You will need to add conditional tags to remove the author link from specific posts and pages.
Here's examples of modifying the post info shortcodes conditionally.
July 7, 2016 at 7:20 am #189015smenegassi
ParticipantOK. thanks Brad.
I know what was happening ! I had "Genesis Simple Edits Plugin" on, so the "shortcodes" from the Plugin were taken over the filter I was adding to my functions.php file. I desactived the plugin and then may functions.php file took over.
Thanks again.
now I have to make my conditionals tags.I am considering in joining your WP sites. I really want to learn about filters, hooks and actions !
cheers
s.July 7, 2016 at 7:25 am #189017Brad Dalton
Participant -
AuthorPosts
- The topic ‘to remove the post author’ is closed to new replies.