• Hello, I recently setup WP and everything works great!

    I decided to add includes to pull the content depending on the link clicked from seperate files.

    I did this so that my styleswitcher would keep the current page rather than going to the main page.

    The problem is that now the Content of msgs on the main page (news) doesnt display. The title, name, time and all that does..but only the Msg content is missing.

    Here is the code I am using:
    [code]
    <?php
    if ($link == page2){
    $page="pages/page2.html";
    }
    elseif($link == page3){
    $page="pages/page3.html";
    }
    else{
    $page="pages/page1.html";
    }
    ?>
    [/code]

    Then in my index.php where my content goes I call this:

    [code]
    <?php include($page); ?>
    [/code]

    which the default page calls:

    [code]
    <div id="nav"> <!-- "nav" div box for navigation -->
    <div id="arm1"></div>
    <div id="paine"></div>

    <!-- Navigation List -->

      <?php wp_style_switcher(); ?>

    </div>

    <!-- "content" div box for the main content window -->
    <div id="content">

    <div id="arm2"></div>

    <div id="content2">
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>

    <h2><?php the_time("M. d, Y"); ?></h2>

    <div class="post">
    <h3 class="storytitle" id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></h3>
    <div class="meta">Posted by <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>

    <div class="storycontent">
    <?php the_content(); ?>
    </div>

    <div class="feedback">
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__('Add Comment | Total:(0)'), __('Add Comment | Total:(1)'), __('Add Comment | Total:(%)')); ?>
    </div>

    <!--
    <?php trackback_rdf(); ?>
    -->

    <?php include(ABSPATH . 'wp-comments.php'); ?>
    </div>

    <?php endforeach; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    </div>

    </div> <!-- End Content -->
    [/code]

    ..

    Works fine, except as I said, the Msg content isn’t displayed..but all other is.

    Any ideas?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Template Switcher: Content of msg not shown’ is closed to new replies.