• Resolved JackWReid

    (@jackwreid)


    I made a series of changes to the template files on my local MAMP install of 3.1.8 and refreshed the page and for some reason only the index page (as in localhost:port/nothing) will display any content. Any other routes render a blank document.

    They were all working fine before this little bunch of changes and I’ve tried disabling all templates except for index.php to force all routes to render with the template that seems to work with the index page of the site. Doesn’t work. Here’s the header code that is called into index.php, hopefully it might give some insight.

    <!doctype html>
    <html <?php language_attributes(); ?>>
    <head>
    	<meta charset="<?php bloginfo( 'charset' ); ?>" />
        <title><?php wp_title(); ?></title>
        <link rel="profile" href="http://gmpg.org/xfn/11" />
        <link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?>" type="text/css" media="screen" />
        <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
        <?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
        <?php wp_head(); ?>
    <body>
    <div id="header" class="header-home">
    	<h1 id="title"><a href="<?php site_url(); ?>">PearShaped</a></h1>
    	<h2>Online Music Magazine</h2>
    	<?php get_search_form(); ?>
        <div class="menu">
            <li><a href="http://localhost:8888/category/events">Events</a></li>
            <li><a href="http://localhost:8888/category/reviews">Reviews</a></li>
            <li><a href="http://localhost:8888/category/features">Features</a></li>
            <li><a href="http://localhost:8888/category/columns">Columns</a></li>
            <li><a href="http://localhost:8888/directory">Directory</a></li>
            <li><a href="http://localhost:8888/contact-us">Contact Us</a></li>
            <li><a href="http://localhost:8888/join">Join</a></li>
        </div>
    </div>
Viewing 1 replies (of 1 total)
  • Thread Starter JackWReid

    (@jackwreid)

    Turns out my nav URLs suddenly needed forward slashes at the end, so the links weren’t working properly and pointing to a location that wouldn’t render any template. Weird.

Viewing 1 replies (of 1 total)

The topic ‘Suddenly, only index.php renders’ is closed to new replies.