Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2799

    How difficult would it be to modify the theme to display the additional heading DIV on selective pages. That is, can I use it on some pages and not others. For example, I’d like to keep the strip at the top of the portfolio to utilize the sort functions, but on most pages I could do without it. Any help would be appreciated.

    #39352

    Hey,

    the additional header is created by following code in header.php:

    <?php

    #breadcrumb navigation
    if(!is_front_page()){

    if($k_option['custom']['headlineContent'] == '')
    {
    $headline = get_post_meta($post->ID, "_headline", true);
    if($headline != "") $headline = '<h2>'.$headline.'</h2>';
    }
    else
    {
    $headline = $k_option['custom']['headlineContent'];
    }
    echo '<div class="wrapper wrapper_heading ie6fix" id="wrapper_featured_area">';
    echo '<div class="overlay_top ie6fix"></div>';
    echo '<div class="overlay_bottom ie6fix">';

    echo '</div>';

    echo '<div class="center">';
    if($headline != "") echo $headline;
    echo '</div></div>';
    echo '<div class="wrapper" id="wrapper_stripe">';
    if(class_exists('kclass_breadcrumb')){ $bc = new kclass_breadcrumb; }
    echo '</div>';
    }
    ?>

    You can use post meta, etc. to exlude/include the output on an individual basis.

    #39353

    Messing around last night I came up with something that works, but wouldn’t be nearly as clean as what you are proposing.

    So if I need to exclude a page with an ID of 2, how would I amend the above code. I’m getting an error an undefined method error, so I am obviously wrong in my placement.

    Appreciate the help.

    #39354

    Hey,

    Firstly if you’re getting errors I’d recommend starting with a fresh copy of the template files.

    The code Dude posted above tells the page to show the content on any page except the front page / home page because of this code:

    if ( !is_front_page() ) {

    This can be modified to not show up on other pages or you can use the code elsewhere in the code to further customise which code will show up on certain pages.

    For example, to stop the breadcrumbs showing up on a page called about, you could use this code:

    <?php

    #breadcrumb navigation
    if(!is_front_page()){

    if($k_option['custom']['headlineContent'] == '')
    {
    $headline = get_post_meta($post->ID, "_headline", true);
    if($headline != "") $headline = '<h2>'.$headline.'</h2>';
    }
    else
    {
    $headline = $k_option['custom']['headlineContent'];
    }
    echo '<div class="wrapper wrapper_heading ie6fix" id="wrapper_featured_area">';
    echo '<div class="overlay_top ie6fix"></div>';
    echo '<div class="overlay_bottom ie6fix">';

    echo '</div>';

    echo '<div class="center">';
    if($headline != "") echo $headline;
    echo '</div></div>';
    echo '<div class="wrapper" id="wrapper_stripe">';

    if(!is_page('about')){

    if(class_exists('kclass_breadcrumb')){ $bc = new kclass_breadcrumb; }

    }

    echo '</div>';
    }
    ?>

    You can get a full list of template tags from the Conditional Tags page in the WordPress Codex.

    Hope this helps!

    James

    #39355

    Dude, you can close this one out. Custom fields did the trick.

    #39356

    Hey,

    Awesome, glad to hear you’ve got this working as you want.

    Let us know if you have any other questions.

    James

    #39357

    What can I modify to just turn off the headline everywhere? That big white stripe is just awful looking.

    here is what I’m talking about: http://kprotopapas.com/?page_id=46

    #39358

    Hey,

    add following code to style.css:

    #wrapper_featured_area{
    display: none !important;
    }

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

The topic ‘Selective Use of the "Additional Heading" Space’ is closed to new replies.