WordPress.org

Forums

[resolved] Footer missing on index page (4 posts)

  1. XtraGamer
    Member
    Posted 10 months ago #

    Hi All,

    I'm currently using a custom theme which I've been using for many years and have never had any issues with. However today I deactivated all my plugins in an attempt to update WordPress to the latest version. Once I reactivated them I've found that:

    1) Only a single post displays on my main page when there should be 10
    2) The footer has also disappeared off my main page

    I'm doubtful how it can be a mistake with the index.php file itself as I haven't edited this today but I've posted it below just incase there could be.

    <?php get_header(); ?>

    <?php get_sidebar(); ?>

    <div id="fb-root"></div>
    <script>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
    fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>

    <div id="page-content">

    <!--search engine -->

    <form action="http://www.google.co.uk/cse" id="cse-search-box" target="_blank">
    <div>
    <input type="hidden" name="cx" value="partner-pub-2518252081357210:m2ovtt-b8yn" />
    <input type="hidden" name="ie" value="ISO-8859-1" />
    <input type="text" name="q" size="31" />
    <input type="submit" name="sa" value="Search" />
    </div>
    </form>
    <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
    <!-- Top banner ad -->
    <script type="text/javascript"><!--
    google_ad_client = "pub-2518252081357210";
    /* 468x60, created 4/1/08 */
    google_ad_slot = "1295384887";
    google_ad_width = 468;
    google_ad_height = 60;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>

    <iframe src="http://rcm-uk.amazon.co.uk/e/cm?t=xtrgam-21&o=2&p=26&l=ur1&category=pcvideogames&banner=1EZH10GZG35XXVXEHQ02&f=ifr" width="468" height="60" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"></iframe>

    <? $p = 0; ?>

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class="entry" id="post-<?php the_ID(); ?>">
    <h1>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h1>
    <h2><?php the_time('F jS, Y') ?> by <?php the_author() ?></h2>

    <? $p++; ?>
    <? if ($p <= 2) { ?>

    <div id="boxad300">
    <script type="text/javascript"><!--
    google_ad_client = "pub-2518252081357210";
    /* 300x250, created 4/1/08 */
    google_ad_slot = "2374197552";
    google_ad_width = 300;
    google_ad_height = 250;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    </div>

    <? } ?>

    <?php the_content('Read the rest of this entry »'); ?>
    <?php
    wp_gdsr_render_multi(3)
    ?>

    <p class="postmetadata"><?php the_tags('Tags: ', ', ', '
    '); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>

    </div>

    <?php endwhile; ?>

    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
    </div>

    <?php else : ?>

    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.</p>
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>

    <?php endif; ?>

    </div>

    <?php get_footer(); ?>

    Many thanks for your help!

    The blog I need help with is http://www.xtragamer.co.uk.

  2. alchymyth
    Forum Moderator
    Posted 10 months ago #

    please enable DEBUG to see if you get any error mesages;
    http://codex.wordpress.org/Debugging_in_WordPress

    the output seems to be breaking before this line or caused by this line:

    wp_gdsr_render_multi(3)
  3. XtraGamer
    Member
    Posted 10 months ago #

    Hi alchymyth,

    Just to say thank you! That was indeed the problem. That line was due to an old plugin which I no longer used, so removing it fixed the problem!

  4. alchymyth
    Forum Moderator
    Posted 10 months ago #

    the recommended way to avoid this kind of problem when adding plugin functions into templates would be (using your example):

    <?php
    if( function_exists( 'wp_gdsr_render_multi' ) ) wp_gdsr_render_multi(3);
    ?>

Reply

You must log in to post.

About this Topic