Community Forums › Forums › Archived Forums › Design Tips and Tricks › remove site-inner from specific pages
- This topic has 4 replies, 2 voices, and was last updated 7 years, 2 months ago by giupeppo.
-
AuthorPosts
-
January 16, 2017 at 3:29 am #199457giupeppoMember
Hi, I'm using Genesis with Showcase Pro child theme.
I have a big problem:
I can't find the way to remove the site-inner element from certain pages. (for example if I want a page to be full width)Also, because of that problem I have duplicate H1 tags (because I used display:none to hide the site-inner)
How can I create a custom page template without the site-inner element?.
Also inside the pages I have h2 tags for things like main-navigation and skip-links. I want them to go away.
How can I do it?Thank you
http://www.seobay.itJanuary 16, 2017 at 7:07 am #199461Victor FontModeratorIf you copy genesis/header.php and footer.php into your child theme directory, you can edit those files and add a is_page() conditional around the code that generates the site-inner opening and closing markup as well as the structural wrap.
As for skip links and the main navigation screen reader text, turn off accessibility support. You'll be damaging your website's SEO by doing this, but it's your choice. Accessibility support is a ranking signal for Google these days.
Another thing I noticed on your site is that you are not using a SSL certificate. When Google releases the next version of Chrome at the end of this month, sites without SSL are going to be prominently flagged as "Not Secure". Google is doing what it can to enforce the concept of HTTPS Everywhere they introduced in 2014. Google's algorithm has changed to give SSL sites ranking priority over non-SSL sites.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?January 16, 2017 at 8:30 am #199473giupeppoMemberHi Victor,
First of all I want to thank you for the valuable information you gave me.
I will leave the skip links and main navigation and I will also implement HTTPS on my website.For what concern the site-inner I looked at those 2 files but I would need a little more help if you can please.
I can see that the file header.php ends with an opening tag (or something like that) for the site-inner as you said
genesis_structural_wrap( 'site-inner' );
At the same time the footer.php opens with a closing tag for the site-inner
genesis_structural_wrap( 'site-inner', 'close' ); genesis_markup( array( 'close' => '</div>', 'context' => 'site-inner', ) );
Can you help me to understand how can I use a conditional statement for run that code only on specific pages?
Also, is it possible to create a different template which I can use whenever I need a page without the site-inner?
So that I don't need to add new pages to the script but I only have to assign the new template to the page that I am creating.Thanks again for your precious help!
Regards,
Giuseppeedit: I am trying to do it because I want to remove the auto entry-title. In some pages I need to insert a custom H1 and I do not want it to be duplicated.
I was thinking that by removing the entire site-inner for those pages it will also remove the entry-title. Can you confirm it?
(because if it does not work I can just hide the site-inner via CSS, the problem with this approach is that the H1 tags also if is not visible is still there and so.. duplicated)Thanks again
January 16, 2017 at 10:06 am #199480Victor FontModeratorremoving site-inner will not remove entry title. It will only remove the site-inner div. If you want to remove entry titles, you need this snippet. Change the numbers in the array to the page_ids of the pages you want the title removed.
add_action( 'get_header', 'child_remove_page_titles' ); function child_remove_page_titles() { $pages = array('1', '2', '3', ); if ( is_page( $pages ) ) { remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); } }
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?January 17, 2017 at 2:41 am #199532giupeppoMemberHi Victor,
I removed the entry titles with your code and I will just hide via CSS the site-inner when I don't need it.Thanks again for your help! I have been trying to figure it out for the last 3 days..
Greetings,
Giuseppe
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.