Support » Fixing WordPress » page working then stops rendering completely

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi

    Your jobs page is not loading the right sidebar. The news page is.

    There will be a line of code in whatever template the News page is using that calls in the right sidebar.

    You must figure out what template the Jobs page uses, and add that same line of code from the news page template into the jobs page template, in the same place in the file that it is, in the News page template file.


    I do have the code for the sidebar: <?php get_sidebar(); ?> in the index page, just like the news site. The news site is WP 2.6, but that shouldn’t make a difference. The thing that I don’t understand is that it was working perfectly and all I did was change the sidebar.php file. Then it went haywire. I even copied the news index page and sidebar, etc., but the sidebar didn’t show up. It also doesn’t render the footer, which is included in index.php. Should I just use WP 2.6 since I know it works?


    Please post your sidebar code either on your site or in a pastebin and post the URL here.

    Obviously something in your code is causing the issue.

    You have two sidebars. Are they both defined in sidebar.php or is one defined in a second sidebar file? If a second, what is the name of the file? If they are both defined in one file, how does the code know whether it is being called to load the left or the right sidebar?

    Thank you for helping me.

    There is only one sidebar that is called. The left sidebar is part of the university template. Instead of breaking the file into header.php, footer.php and index.php, I just put it all in index.php. Here is the code:

    * @package WordPress
    * @subpackage Default_Theme

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “”>
    <html xmlns=””>

    <title><?php wp_title(‘«’, true, ‘right’); ?> <?php bloginfo(‘name’); ?></title>
    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />

    <style type=”text/css” media=”all”>
    @import “null?\”\{“;
    @import “/template/css/global_relative.css”;
    <style type=”text/css” media=”all”>
    @media tty { i{content:”\”;/*” “*/}}@m; @import ‘/template/css/global_relative.css’; /*”;} }/* */
    <script src=”/template/scripts/nav.js” type=”text/javascript”></script>
    <script src=”/template/scripts/AC_RunActiveContent.js” type=”text/javascript”></script>
    <link type=”text/css” media=”print” rel=”stylesheet” href=”/template/css/print.css” />
    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
    <body >
    <div id=”skipLinks”>skip to: page content | links on this page | site navigation | footer (site information)</div>
    <div id=”container”>
    <div id=”masthead”>
    <img src=”/template/titles/title_casnr.gif” alt=”Texas Tech University” id=”headerLogo” height=”92″ width=”448″ /> </div>

    <div id=”globalNav”>
    <? include ($_SERVER[‘DOCUMENT_ROOT’].”/template/ttu_template_components/Global_TopNav.xhtml”); ?>
    <!– ___________________________________________________________________________________________ –>

    <div id=”sideBar”>
    <? include ($_SERVER[‘DOCUMENT_ROOT’].”/template/ttu_template_components/Tier3_Search.xhtml”); ?>

    <? include (“”); ?>

    <h3 onclick=”showHideSwitch(‘ttuMenu’)” class=”expandMenuHdr”>Texas Tech University <img src=”/template/images/icons/menu_on_grey.gif” width=”7″ height=”7″ id=”ttuMenuButton” alt=”Expand TTU Menu.” /></h3>
    <dl class=”expandMenu” style=”margin:0;” id=”mainTTUmenu”>
    <dd class=”showSwitch” id=”ttuMenu”>
    <? include ($_SERVER[‘DOCUMENT_ROOT’].”/template/ttu_template_components/Global_LeftNav.xhtml”); ?>
    <script language=”javascript” type=”text/javascript” src=”/template/scripts/collapse.js”></script>
    Need Help?

    <!– ____________________________________________________________________________________________________________________ –>
    <div id=”crumbs”>
    TTU Home
    CASNR HomeCASNR Jobs

    <!– ____________________________________________________________________________________________________________________ –>

    <div id=”content”>
    <div class=”narrowcolumn”>
    <h1>CASNR Jobs</h1>

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

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

    <div <?php post_class() ?> id=”post-<?php the_ID(); ?>”>
    <h2>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h2>
    <p class=”date”><?php the_time(‘F jS, Y’) ?> <!– by <?php the_author() ?> –></p>

    <div class=”entry”>
    <?php the_content(‘Read the rest of this entry »’); ?>


    <?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>

    <?php else : ?>

    <h2 class=”center”>Not Found</h2>
    <p class=”center”>Sorry, but you are looking for something that isn’t here.</p>
    <?php get_search_form(); ?>

    <?php endif; ?>

    <?php get_sidebar(); ?>
    <div id=”footer”>
    <? include (“”); ?>

    <? include ($_SERVER[‘DOCUMENT_ROOT’].”/template/ttu_template_components/Global_Footer.xhtml”); ?>
    Texas Tech University | All Rights Reserved |
    <script language=”JavaScript” type=”text/javascript”><!–//hide script from old browsers
    document.write( “Last updated: ” + document.lastModified +””);
    //end hiding contents –>

    Sorry about all that code. Here is the pastbin link:

    How cool is that?!


    Something must be wrong with your sidebar.php file because the get_sidebar() is not loading it. That function only loads a file named sidebar.php. That is the name of your sidebar file?

    if not, you can use <?php include (‘sidebar2.php’); ?> or whatever the file is named.

    Can you please put your sidebar file in another pastebin?

    Here is my sidebar.php file:

    I also don’t understand why the rest of the page (footer) doesn’t load either.

    Thanks again.

    Hi – The first thing I see is it appears you have an extra closing php tag near the bottom of the file, as marked below:

      <?php wp_register(); ?>
        <li><?php wp_loginout(); ?></li>
        <?php wp_meta(); ?>
    <!--	THIS IS EXTRA AND NOT NEEDED <?php } ?>   -->
    <?php endif; ?>

    I ran your jobs page through the page validator and it has a few errors around DIV’s improperly closed – that sort of thing can cause this type of problem. See if you can clean up the errors and if that corrects your problem.

    Another thing is your left sidebar, in the code you sent earlier, is defined as <div id="sideBar">
    Your right sidebar is defined as <div id="sidebar">

    An ID must be unique in a document. Some parts of HTML and CSS are case sensitive and others are not. Its not good practice to have names that similar. If you want to have them both identified as “sidebar” for CSS purposes, its better to make it a class instead of an ID as classes don’t have to be unique.

    See if all this helps

    Wow, thanks! That extra code in the sidebar was causing the problem. I will also change the name to sidebar2. Have a great day!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘page working then stops rendering completely’ is closed to new replies.