Community Forums › Forums › General Discussion › Remove Post Meta from Home Page
Tagged: is_front_page, is_home, meta, post meta
This topic contains 13 replies, has 7 voices, and was last updated by anitac 3 months, 2 weeks ago.
-
AuthorPosts
-
January 13, 2013 at 3:16 pm #11643
How can I remove the post meta on the home page only?
Using Pretty Pictures theme.
January 13, 2013 at 7:54 pm #11717I’m not familiar with Pretty Pictures, but I think if you add this code to home.php then it will be removed.
/** Remove the post meta function for front page only */
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
January 13, 2013 at 9:52 pm #11741Appreciate the input but that’s not it.
Your snippet “should” remove post meta across the whole site, but for some reason it doesn’t work on Pretty Pictures. Not sure why it doesn’t work on this theme.
I want to remove post meta from the homepage only.
January 13, 2013 at 10:13 pm #11746I mentioned to add it to home.php. Like I said I’m not familiar with Pretty Pictures, and I don’t have access to the them.
Also, maybe try adding the plugin – http://wordpress.org/extend/plugins/genesis-visual-hook-guide/ – to see which hook the post meta is added to.
January 15, 2013 at 9:52 pm #12197Thanks Barney.
No home.php in this theme
Does anyone have a clue?
January 17, 2013 at 10:33 am #12634Ezines,
You’ll want to add a function with a conditional statement in your functions.php file, like this:
/** Remove the post meta function on homepage */
function my_remove_post_meta() {
if ( is_home() || is_front_page() ) {
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
}}
My Websites: TheCookingDish.com | ChrisMower.com
Connect with me: Facebook | Pinterest | Twitter | Google +January 18, 2013 at 10:45 am #12875Thanks FireSamurai, but that did not work.
None of the remove post meta functions seem work on this theme.
This is from the SP code snippets page and it also does not work. Meta remains across the theme:
/** Remove the post meta function */
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );I’ve also tried a variety of things all over the Simple Hooks plugin.
I sincerely thank to community for offering assistance.
It’s getting to be WAY PAST TIME for some help from Studiopress support. Is anyone out there?
January 18, 2013 at 10:55 am #12877It’s getting to be WAY PAST TIME for some help from Studiopress support. Is anyone out there?
This support forum is for users such as yourself to assist other users. “Official” StudioPress support is for getting the theme to look like the demo, and for technical assistance, and is done by submitting a help ticket. Anything beyond that is deemed “customization” and is handled here on the forum.
Edited to add – I’m a StudioPress user like you, not a StudioPress employee.
Susan @ Graphically Designing I’d love to customize your website! I tweet!
I’ve taken up the challenge! – help me answer some of the unanswered postsJanuary 18, 2013 at 11:10 am #12880Try this:
Susan @ Graphically Designing I’d love to customize your website! I tweet!
I’ve taken up the challenge! – help me answer some of the unanswered postsJanuary 18, 2013 at 1:30 pm #12905FireSamurai – Thanks again!
I kept playing with your code. It was very close, just missing a couple of exclamation marks:
function my_remove_post_meta() {
if ( !is_home() || !is_front_page() ) {
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
}}January 18, 2013 at 1:57 pm #12913@ezines – were you able to utilize the gist to solve your problem?
Susan @ Graphically Designing I’d love to customize your website! I tweet!
I’ve taken up the challenge! – help me answer some of the unanswered postsJanuary 28, 2013 at 4:05 pm #15732Hey there,
Just seeing this thread and wanted to post a complete code snippet to remove the post meta on the home page only of a site. Thanks to @Susan for the starter gist and @ezines for the pointing out the correct action:
add_action( ‘genesis_before’, ‘child_conditional_actions’ );
function child_conditional_actions() {if( is_home() || is_front_page() ) { //if page is home page or front page
remove_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );
}}
Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question.
I tweet @cdils.
February 28, 2013 at 12:28 pm #23317Couldn’t get that code working. Not sure why?
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.March 3, 2013 at 7:47 pm #23971Brad, if you didn’t change the apostrophes – try copying this. I fixed them.
add_action( ‘genesis_before’, ‘child_conditional_actions’ ); function child_conditional_actions() { if( is_home() || is_front_page() ) { //if page is home page or front page remove_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ ); } }
Need customization services or other help? Visit me here: Cre8tiveDiva.com | Twitter: @thecre8tivediva
Why Not Take The Challenge! – Help us answer some of the unanswered posts -
AuthorPosts
You must be logged in to reply to this topic.