Community Forums › Forums › Archived Forums › Design Tips and Tricks › Remove id="content" and Middle widgets from home page…
Tagged: .content area, css, Sidebar, widgets
- This topic has 9 replies, 2 voices, and was last updated 10 years, 9 months ago by
Brad Dalton.
-
AuthorPosts
-
May 11, 2014 at 1:07 pm #104552
lenz
MemberHola all,
I am trying to rework the enterprise theme (the older non pro one) so that the whole "Content" area is not displayed when on the home page. On the home page this section includes only the "Middle" widgets and per the client, these are not needed. Fair enough - so I went in and removed all references to the "Home Middle Widgets" but there is some kind of default for that middle section that I cannot make go away - it is showing in the leftmost widget "All Posts" and in the rightmost widget area the "Primary Sidebar". I have done stuff like this before so this seems like it should be Genesis 101 but it is not working. Thoughts on how to remove this content area on the front page only?
http://www2.woodruff-brown.com/May 11, 2014 at 7:04 pm #104576Brad Dalton
ParticipantIf the widgets aren't populated, the widget classes are not generated.
Please rework your question as it is not clear.
May 12, 2014 at 3:43 pm #104752lenz
MemberThanks - Ok - reword. I want to remove the center content area, below the wp-slideshow and above the footer area. When the widgets are not populated this area is filled with recent posts by default with this theme... The section is referred to as "inner" but i cannot tell where or if its able to be omitted from the front page. http://www2.woodruff-brown.com/
When there is no content in the widgets this is the code created.
<div id="inner"><div id="content-sidebar-wrap"><div id="content" class="hfeed"><div class="post-33 post type-post status-publish format-standard hentry category-residential entry"><h2 class="entry-title"><a href="http://www2.woodruff-brown.com/residential-alcyone-home/" title="Residential Alcyone Home" rel="bookmark">Residential Alcyone Home</a></h2> <div class="entry-content"><p><a href="http://www2.woodruff-brown.com/wp-content/uploads/2014/05/Alcyone01.jpg"><img class="alignnone size-thumbnail wp-image-34" src="http://www2.woodruff-brown.com/wp-content/uploads/2014/05/Alcyone01-150x150.jpg" alt="Alcyone01" width="150" height="150" /></a></p> </div><div class="post-meta"><span class="categories">Filed Under: <a href="http://www2.woodruff-brown.com/category/residential/" title="View all posts in Residential" rel="category tag">Residential</a></span> </div></div><div class="post-1 post type-post status-publish format-standard hentry category-uncategorized entry"><h2 class="entry-title"><a href="http://www2.woodruff-brown.com/hello-world/" title="Hello world!" rel="bookmark">Hello world!</a></h2> <div class="entry-content"><p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!</p> </div><div class="post-meta"><span class="categories">Filed Under: <a href="http://www2.woodruff-brown.com/category/uncategorized/" title="View all posts in Uncategorized" rel="category tag">Uncategorized</a></span> </div></div></div></div></div>
When there is a minimum of text in the widgets this is the code created.
<div id="inner"><div id="content-sidebar-wrap"><div id="content" class="hfeed"><div id="home-middle"><div class="home-middle-1"><div id="text-8" class="widget widget_text"><div class="widget-wrap"> <div class="textwidget">Ignore this content - it will be removed in future versions.</div> </div></div> </div><!-- end .home-middle-1 --></div><!-- end #home-middle --></div></div></div>
May 12, 2014 at 7:33 pm #104805Brad Dalton
ParticipantYou can remove the loop by adding this line of code to the top of your home.php or front-page.php file.
remove_action( 'genesis_loop', 'genesis_do_loop' );
May 12, 2014 at 7:46 pm #104813lenz
MemberAwesome! Thanks! And so close. If you could look at the site again you will see that the "Inner" div tag is still there leaving a large space with a visible border... That is what is driving me so buggo about this - I have like 8 almost fixes that get this close. but no banana. Yours is the cleanest so far, by far.
May 12, 2014 at 7:46 pm #104814lenz
MemberAwesome! Thanks! And so close. If you could look at the site again you will see that the "Inner" div tag is still there leaving a large space with a visible border... That is what is driving me so buggo about this - I have like 8 almost fixes that get this close. but no banana. Yours is the cleanest so far, by far.
May 12, 2014 at 7:57 pm #104816Brad Dalton
ParticipantPlease use Firebug to find the class and make changes in your browser using Firebug to test the solution before editing/removing any CSS.
May 12, 2014 at 8:08 pm #104822lenz
MemberI did. The class is "Inner" and i cannot change it as it will affect the content on the whole site. It needs to stay as is for the rest of the site and just be removed from the home page.
May 12, 2014 at 8:15 pm #104825lenz
MemberOk - so I did some significant massaging to the css and it is working the way i want - rock on braddalton!
May 12, 2014 at 9:13 pm #104835Brad Dalton
ParticipantGood stuff. Happy to see you did most of the work yourself as that's the best way to learn. Cheers.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.