Eleven40 Welcome Text Widget Help

Community Forums Forums General Discussion Eleven40 Welcome Text Widget Help

This topic is: not resolved

This topic contains 11 replies, has 3 voices, and was last updated by  braddalton 1 month, 3 weeks ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #30985

    seanb
    Participant
    Post count: 1

    (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!

    #31020

    braddalton
    Participant
    Post count: 7458

    Change 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.


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #31245

    seanb
    Participant
    Post count: 1

    Thanks for the pointers and your work on github Brad – I will check them out!

    #31249

    braddalton
    Participant
    Post count: 7458

    No worries Sean.


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #91447

    Brent
    Participant
    Post count: 10

    Brad, 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!

    #91479

    braddalton
    Participant
    Post count: 7458

    Conditional 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 ) ) ) {

    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #91480

    braddalton
    Participant
    Post count: 7458

    You could also use

    if ( !is_page_template('page_landing.php') || !is_single( array( 1, 2 ) ) ) {
    

    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #91661

    Brent
    Participant
    Post count: 10

    Thanks 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!

    #91676

    Brent
    Participant
    Post count: 10

    Brad,

    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!

    • This reply was modified 1 month, 3 weeks ago by  Brent.
    • This reply was modified 1 month, 3 weeks ago by  Brent.
    #91796

    braddalton
    Participant
    Post count: 7458

    Looks like you got this fixed.


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #91846

    Brent
    Participant
    Post count: 10

    I 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!

    #91853

    braddalton
    Participant
    Post count: 7458

    You can hide it using CSS.

    .page-template-page_landing-php .site-description {
    display: none;
    }
    

    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.