Community Forums › Forums › Archived Forums › Design Tips and Tricks › Replacing Primary sidebar on front page
Tagged: front page, going green
- This topic has 7 replies, 2 voices, and was last updated 12 years, 5 months ago by
Brad Dalton.
-
AuthorPosts
-
May 29, 2013 at 12:33 am #43022
mjcollins
MemberI'm using the Going Green theme and I'm trying to replace the Primary Sidebar only on the front page with a custom Sidebar. I am a real newbie to coding etc but do understand that I need to register a sidebar and then put code somewhere to activate.
I would appreciate help on:
- The code I need to use to do this
- Where precisely I need to put the code
- Also - if anyone can point me in the direction of reading material on how to generally modify themes using coding that would be great.
Apologies if this sounds basic, but I have been going around in circles in the forums. Thanks! Mike.
http://www,youririshheritage.comMay 29, 2013 at 1:53 am #43028Brad Dalton
ParticipantWhats the difference between the default primary sidebar and what you want on the home page?
Have you tried the Genesis Layout Extra's plugin?
May 29, 2013 at 1:58 am #43030mjcollins
MemberThe difference I want is:
Static Home Page: Sidebar has NO email signup at top (it is contained in page content instead)
All other pages: Sidebar has email signup at top.
(www.youririshheritage.com homepage shows what I dont want at the moment!)
Thanks - Mike.
May 29, 2013 at 4:03 am #43035Brad Dalton
ParticipantYou could simply install the Widget Logic plugin and add a conditional tag to the widget you want displayed based on these conditions.
Another option, if using a static page as your front page is to install the Simple Sidebars plugin and create a custom sidebar which can be selected for use on any page.
If you're not using a static page as your front page, then the Widget Logic plugin is the best solution.
Use:
is_home displays the widget on the home page only
or
!is_home displays on all pages excluding the home page
Use:
is_front_page if using a static page as your front page.
May 29, 2013 at 4:59 am #43037mjcollins
MemberI used Widget logic as you suggested - which should work in theory as follows (?) - I am using a static frontpage:
is_front_pageshould display the email widget on the front page only BUT the widget is still displaying on all pages
then I tried !is_front_pagewhich should display on all except front page BUT is is now not displaying widget on any pages.Not sure whats going on - but feels like I'm almost there.
May 29, 2013 at 5:05 am #43038Brad Dalton
ParticipantTry is_home use the page for the home page which you can grab from the source code and use it like this:
is_page('007')
May 29, 2013 at 9:24 am #43066mjcollins
MemberThat works - I used
!is_page('021')
to exclude widget from the homepage.I assume that 21 is a static address for that page?
Thanks a lot for your help, Mike.
May 29, 2013 at 11:11 pm #43156Brad Dalton
ParticipantAffirmative Mike. It's the unique i.d for that page which you can view in the source code.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.