Need to display a page on a diff index
-
Hi, im havin a rough time gettin this to work and I’d really appreciate it if someone could spot where my code is wrong, ive got a deadline coming up and this is my last hurdle. Thanks in advance for your help.. its MUCH appreciated. I’m using 1.3a4 and am aware of using alphas, and if this is possible using 1.2 (which im running on another site) using an alternate method that would be just fine also…
I have created a page that I want to display on a different index.php
and I dont want it showing up on the main wp index at all.
here is my setup:
I have a directory called “features” in this directory is my wordpress folder(“wp”)
and another folder “01” that has the index.php I want to display my page on.
I have setup my permalinks like so:%postname%
my page link looks like this:
https://mysite.com/features/wp/this-is-mypage/
now, on the index.php in the 01 folder I have put this code at the top:
<?php
/* Don't remove this line. */
$blog = 1;
if (!isset($p)) {
$p = "this-is-mypage";
}
require('../wp/wp-blog-header.php');
?>
In the div that I want the entry displayed in I have this:
<div id="contentfeat">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_date('','<h2 class="dateicon">','</h2>'); ?>
<div class="post">
<h3 class="storytitle" id="post-<?php the_ID(); ?>">
the_permalink() ?>" rel="bookmark"><?php the_title(); ?></h3>
<div class="meta"><?php _e("Filed under:"); ?> <?php the_category(',')
?> | <img src="graphics/author.png" width="11" height="10" border="0"
alt="" /> <?php the_author_firstname() ?> @ <?php the_time() ?> <?php
edit_post_link(__('Edit This')); ?></div>
<div class="storycontent">
<?php the_content(__('(more...)')); ?>
</div>
<div class="feedback">
<?php wp_link_pages(); ?>
<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'),
__('Comments (%)')); ?>
</div>
</div>
<?php comments_template(); // Get wp-comments.php template ?>
<?php endwhile; else: ?>
<?php _e('Sorry, no posts matched your criteria.'); ?>
<?php endif; ?>
<?php posts_nav_link(' — ', __('&laquo; Previous Page'),
__('Next Page &raquo;')); ?>
</div>
—now when I view the page I get the “Sorry no posts matched your criteria” .
this has had me stumped for a few days now and ive been going over every forum post I can find (actually where I got the top portion of code that I modified, which might be whats borked) and the wiki and all over google and havent been able to recognize what to do to fix it, I’m much more versed in xhtml and css than I am php…
thanks for you time and help…..
l??k
- The topic ‘Need to display a page on a diff index’ is closed to new replies.