Community Forums › Forums › Archived Forums › Design Tips and Tricks › Code To Remove footers from post pages
Tagged: remove footer post page
- This topic has 11 replies, 4 voices, and was last updated 9 years, 11 months ago by SonjaHelga.
-
AuthorPosts
-
May 15, 2014 at 12:46 pm #105358SonjaHelgaMember
I would like to remove the "footers" from my single post pages, and my pages, and keep on home page.... Any Help?
http://www.rebuild-your-vision.comMay 15, 2014 at 5:04 pm #105382nerdworkerMemberHi SonjaHelga,
I came across this example the sounds like what you want:
http://www.ajsweb.com/how-to-display-genesis-footer-widgets-on-the-homepage-only
I hope that helps,
Stefanie
nerdworker.comMay 15, 2014 at 5:20 pm #105386SonjaHelgaMemberThank you very much for this. I couldn't get that to work, so maybe it doesn't work with all the child themes... but at least I have an idea what I am looking for!!
May 15, 2014 at 5:36 pm #105388nerdworkerMemberDo you happen to be using Jetpack? It has a feature for widget visibility that I've used before that enables you to choose on what pages each widget appears. Kind of a long shot, but worth a try if you already have Jetpack.
May 15, 2014 at 5:37 pm #105389SonjaHelgaMemberNo, I never heard of jetpack. But, if it will help, I can look into it 🙂
May 15, 2014 at 9:31 pm #105423RobodashyMemberWithout using a child theme you are limited to what you can customise directly in the code, as any updates to the Genesis theme will over-write changes you make.
However you can try something along the lines of:
//* Customize Genesis Footer function your_footer() { if( !is_page(''home") ) { remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); } }
You would need to make sure you are removing the action from the right hook, but this is another place to start.
If you think that customisations like this will be something you do more frequently, you could look into using something like the Genesis Extender plugin by Cobalt Apps.Good luck
The large print giveth, and the small print taketh away.
– Tom Waits, “Step Right Up”May 16, 2014 at 5:42 am #105463SonjaHelgaMemberThanks for that... I will not really be doing a lot of changing of the themes. I like the Metro. The reason I want to remove the "Footer" from the post single pages, and the blog pages is because of Duplicate content. I was reading from one SEO article that your blog can be penalized if there is a lot of widget content, because it is duplicated on every blog page..... Made sense to me. On the other hand, I did want the home page to have this content....
May 16, 2014 at 8:04 am #105475Brad DaltonParticipantYou could use a single.php file:
<?php /** * This file adds the single post template to any Genesis child theme. * * @author Brad Dalton */ //* Remove site footer widgets remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); //* Run the Genesis loop genesis();
May 16, 2014 at 8:15 am #105478SonjaHelgaMemberThanks, do I have to add this code to the functions php as well as a new single.php
May 16, 2014 at 8:31 am #105480Brad DaltonParticipantSimply create a new file using a code editor named single.php and add the code then upload to your child theme.
Or add to an existing single.php if you have one.
May 16, 2014 at 9:11 am #105490Brad DaltonParticipantMay 16, 2014 at 9:33 am #105495SonjaHelgaMemberThanks! I shall do that
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.