ThemeShaper Forums » Thematic

[closed]

Slider on homepage, different header on inner pages

(3 posts)
  • Started 7 years ago by ChocHippo
  • Latest reply from ChocHippo
  • This topic is resolved
  1. ChocHippo
    Member

    Hi,

    I'd like to add nivo slider to my front page and dynamic headers(WP plugin) for all inner pages. I can add one or (both)easily to the thematic_header, so it shows both on all pages, but how would I construct PHP to tell it to only show the Nivo on front page (and not inner pages) and the dynamic header on inner pages(not front page).

    I am PHP rookie, I have tried to work it out by looking through forums.. but I'm struggling.

    This is code added to header-extensions.php for dynamic header (placed underneath the #access div):

    <?php // added for dynamic header
            if(function_exists('show_media_header')){
    			echo ' <div id="mediaheader">';
    		show_media_header();
    			echo '</div>';
    		} ?>

    and this is the Nivo slider code in header-extensions.php:

    <div id="slider"><?php echo do_shortcode('[nivoslider id="190"]'); ?></div>

    Any help would be muchely appreciated!! Loving Thematic BTW! Thanks for any help in advance!

    Posted 7 years ago #
  2. EEEEEK... code in header-extensions.php!!!????? FULL-STOP!!!

    we don't advise you to edit core thematic files. all your modications should go in your CHILD THEME'S functions.php and take advantage of thematic's gazillion hooks and filters

    here are a couple of resources on how to build a child theme:
    http://www.catswhocode.com/blog/wordpress-how-to-easily-create-a-thematic-child-theme
    http://themeshaper.com/2009/04/17/wordpress-child-theme-basics/

    to put something on some pages and not on others you need to learn conditional logic (if, else) especially using WP's conditional logic

    basic if/else: http://php.net/manual/en/control-structures.elseif.php
    wp-specific conditional logic: http://codex.wordpress.org/Conditional_Tags

    Posted 7 years ago #
  3. ChocHippo
    Member

    Thanks for the advice Helga - appreciate it!

    I'm new to Thematic, but I'm loving it for all the CSS possibilities, my PHP is patchy despite spending months trying to get head around it. Got the child theme under control... will NOT play w headerextensions.php, will go away and learn these tutes - thanks again!

    Posted 7 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.