Eleven40 Page Title widget customization

Community Forums Forums Design Tips and Tricks Eleven40 Page Title widget customization

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  afinevo 11 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #60474

    afinevo
    Participant
    Post count: 61

    Hey everyone. I’m currently using the elevn40 theme (not the pro version) and I am using the Page Title widget for banner advertising and of course this shows on every page and post. Since I am in the process of renewing my home page, is there a way that I can use this widget differently for the home page. I would like to use text for the widget on my home page and then use it for banner advertising or however I see fit on other pages and posts.

    Thanks in advance!

    http://allgaragefloors.com
    #60638

    cruisegle
    Participant
    Post count: 9

    Hi

    It is a while since I have done this and am sure there is an easier way to do it. However what you could do is remove this from the function file: (Please note you don’t have to remove it)

    /** Add the page title section */
    add_action( ‘genesis_before_content_sidebar_wrap’, ‘eleven40_page_title’ );
    function eleven40_page_title() {
    genesis_widget_area( ‘page-title’, array(
    ‘before’ => ‘<div class=”page-title widget-area”>’,
    ) );
    }

    Then go to simple hooks and check the button under “Content Hooks” to allow for php for the genesis_before_content_sidebar_wrap hook.

    In the hook box itself you can add something like this for individual pages.

    <div class=”page-title widget-area”>
    <?php if (is_home()) { ?>
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Name of Sidebar for Home page’) ) : ?>
    <?php endif; ?>
    <?php } elseif (is_page(‘epoxy-flooring’)) { ?>
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Name of Sidebar for this page’) ) : ?>
    <?php endif; ?>
    <?php } elseif (is_page(‘garage-floor-tiles’)) { ?>
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Name of Sidebar for this page’) ) : ?>
    <?php endif; ?>
    <?php } ?>
    </div>

    Go to Simple Sidebar plugin and add the name of the Sidebars that you have added above; technically you might want to add the sidebars first.

    If it is category based use this:

    <div class=”page-title widget-area”>
    <?php if (is_home()) { ?>
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Name of Sidebar for Home page’) ) : ?>
    <?php endif; ?>
    <?php } elseif (is_category(‘mat-coverings’)) { ?>
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Name of Sidebar for this category’) ) : ?>
    <?php endif; ?>
    <?php } elseif (is_category(‘cleaning-concrete-repair’)) { ?>
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Name of Sidebar for this category’) ) : ?>
    <?php endif; ?>
    <?php } ?>
    </div>

    You could add a universal sidebar that covers every page bar the home or any other page; this would look like this:

    <div class=”page-title widget-area”>
    <?php if (is_home()) { ?>
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Name of Sidebar for Home page’) ) : ?>
    <?php endif; ?>
    <?php } else { ?>
    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Name of Sidebar for the universal one’) ) : ?>
    <?php endif; ?>
    <?php } ?>
    </div>

    If using a custom front page use is_front_page instead of is_home

    Don’t forget that you can mix and match pages and categories etc using elseif but be aware of the hierarchy of the content. By that I mean if you have something in a category and a child of that category and you want the child category to behave differently from the main category then the elseif for this child category must come before the elseif of the main category etc.

    Hope this helps and sorry i my coding is wrong!


    Getting by; just!

    • This reply was modified 11 months, 3 weeks ago by  cruisegle. Reason: Typo
    • This reply was modified 11 months, 3 weeks ago by  cruisegle. Reason: Typo
    #60718

    afinevo
    Participant
    Post count: 61

    Wow…. that’s more than what I had bargained for. I will try it out on my test site to see how it works.

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

You must be logged in to reply to this topic.