Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Nevermind! Found the fix!

    This has been such a helpful thread for me! I’m learning the coding of WordPress, and, naturally, got a little ambitious.

    I was able to apply the code to get unique header photos on each page, which is outstanding! Here’s the issue that I’ve run across:
    1. The home page has no page ID (or at least I couldn’t find it)
    2. I actually want to be able to put a slideshow on the home page anyways, but keep the unique photos for the other pages. I’ve been trying out different slideshow plug-ins, and most of them seem to provide the short code. What I can’t figure out is how to correctly write the php to allow for both a home page slideshow and the other photos to occupy the same space on each page.

    Here is the code I currently have, which is in the header.php file:
    ‘<div id=”slides”><!– slides should be named ‘head-image-[pageID#].jpg’ –!>
    <?php
    if (is_home());
    echo do_shortcode(‘[FrontpageSlideshow fs_cats=1 fs_show_buttons=0 fs_main_width=700px fs_main_height=250px fs_slide_width=100% fs_buttons_width=0% fs_placeholder_height=0px fs_show_comment=0 fs_rounded=0 fs_pause_duration=6000 fs_template=default]’); ?>
    <?php $page_id=get_the_ID();
    if(is_page()) { $image=’head-image-‘.$page_id.’.jpg’; };
    if(!file_exists(TEMPLATEPATH.’/images/’.$image)) { $image=’head-image.jpg’; }
    echo ‘<img src=”‘.get_bloginfo(‘template_url’).’/images/’.$image.'”/>’; ?>
    </div><!– #slides –>’

    What’s happening is that the slideshow is showing up okay on the home page. But on every other page, the slideshow shows up, as well as the unique photo for that page below it, thus pushing down the rest of the content. Of course, if I remove the slideshow code, those pictures show up just fine and in the right position.

    I haven’t been able to apply the correct ‘else’ terminology. Is that what’s needed here?

    Thanks in advance for any help!

Viewing 2 replies - 1 through 2 (of 2 total)