Community Forums › Forums › Archived Forums › General Discussion › Eleven40 Welcome Text Widget Help
Tagged: Eleven40, homepage, welcome widget
- This topic has 11 replies, 3 voices, and was last updated 10 years, 6 months ago by Brad Dalton.
-
AuthorPosts
-
March 24, 2013 at 4:58 pm #30985seanbMember
(keeping these requests separate)
URL is Decahedralist.com
I want to do the following:
1. Move the Welcome Text above the Primary Navigation (welcome text between header image and nav)
2. Only have the Welcome Text on the homepage (I don't want it on every page)
Thanks!
March 24, 2013 at 7:58 pm #31020Brad DaltonParticipantChange the hook location and add a conditional tag. Here's the code https://gist.github.com/braddalton/5234454
You can also reposition the secondary nav menu if needed to any hook location.
March 25, 2013 at 10:06 pm #31245seanbMemberThanks for the pointers and your work on github Brad - I will check them out!
March 25, 2013 at 11:35 pm #31249Brad DaltonParticipantFebruary 20, 2014 at 12:23 pm #91447BrentMemberBrad, how would I modify the code you provide for the homepage only welcome text so it shows up on every page except a few specific ones?
Also, is there a way for it to never show up on a "landing page" template? I'm trying to remove it from all landing pages like this one: http://vosa.com/barclaycard-arrival-world-mastercard-40000-point-bonus/ as well as a few of my other pages.
Thanks so much for your help!
February 20, 2014 at 2:33 pm #91479Brad DaltonParticipantConditional tags are what you need.
This code is one example of how to use different conditions tags after your function.
It will need to be modified to suit your own needs.
if ( !is_page_template(page_landing.php) || !is_page(array(007,008,009) ) ) {
Replace the page i.d's with your own.
If wanting to exclude post i.d's, use
if ( !is_page_template(page_landing.php) || !is_single( array( 1, 2 ) ) ) {
February 20, 2014 at 2:41 pm #91480Brad DaltonParticipantYou could also use
if ( !is_page_template('page_landing.php') || !is_single( array( 1, 2 ) ) ) {
February 21, 2014 at 9:58 am #91661BrentMemberThanks for the quick reply. Right now this is the code for the home feature section:
/** Add the home featured section */ add_action( 'genesis_before_content', 'eleven40_home_featured' ); function eleven40_home_featured() { if (is_active_sidebar( 'home-featured' )) { genesis_widget_area( 'home-featured', array( 'before' => '<div class="home-featured widget-area">', 'after' => '</div>' ) ); } else { genesis_seo_site_description(); } }
Where do I need to put the code you recommend so the feature widget doesn't get displayed on all landing page templates and specific pages? What makes it not show up? Do I need something else after
!is_page_template(page_landing.php) || !is_page(array(007,008,009) ) ) {
to tell it to not display the feature widget?
Thanks!
February 21, 2014 at 10:37 am #91676BrentMemberBrad,
I opted to use this plugin to manage widgets being displayed/not displayed on individual pages. Feel it will be easier than editing the code each time. Is this a good idea or bad?
Now the featured area is no longer showing up on my landing pages the site's tagline is showing up. See an example here.
The page_landing.php has the following line of code in it:
//* Remove site description remove_action( 'genesis_before_content_sidebar_wrap', 'genesis_seo_site_description' );
Any idea why the tagline is still being displayed?
Thanks!
February 21, 2014 at 4:00 pm #91796Brad DaltonParticipantFebruary 21, 2014 at 6:39 pm #91846BrentMemberI got it working by just deleting the tagline from general settings. I would prefer not to have to do that. I have put a tagline back in settings so you can see here what it looks like.
Sorry for the confusion and thanks for your help!
February 21, 2014 at 7:06 pm #91853Brad DaltonParticipantYou can hide it using CSS.
.page-template-page_landing-php .site-description { display: none; }
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.