Include individual page
-
Hi there,
I’ve created a new page with a form in it and I would simply like to display that individual page on my homepage (index.php). Can anyone tell me how I can call just that page in my index.php file? Do I need to include a loop and just reference that page? If so how?
Thanks.
-
Login to WordPress admin or dashboard.
Under Settings => Reading
Change Front page displays to “Static Page” and select the new page in the drop down list to show in home page. Also you need to select the page where normal posts can be displayed.Cool thanks tamilsweet, I’ll give that a try.
my blog (djandjan.com) used into-the-sun-101’s theme. but there is no navigation (ie ? Previous Entries or Next Entries ?) to see next atau before pages. some body can help me how to make it? tq.
You need to edit the theme to get that.
<div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div>
This is the standard navigation template code. If you need further assistance post message again.
That has to be in single.php
Here is the code of kubrick theme.<div id="content" class="narrowcolumn" role="main"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> 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 get_search_form(); ?> <?php endif; ?> </div>
Just for your reference.
thanks for your info. but still do not work. this is the script (single.php). tq.
<?php get_header(); ?>
<!– start content items –>
<div class=”CON”><!– start content left –>
<?php get_sidebar(); ?>
<!– end content left –><!– start center –>
<div class=”SC”><p><img src=”<?php bloginfo(‘template_url’); ?>/images/featured_img.gif” width=”489″ height=”208″ alt=”” /></p>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?><div class=”Post” id=”post-<?php the_ID(); ?>”>
<div class=”PostHead”>
<h1><?php the_title(); ?></h1>
<small class=”PostAuthor”>Admin: <?php the_author() ?> <?php edit_post_link(‘Edit’); ?></small>
<p class=”PostDate”>
<small class=”day”><?php the_time(‘j’) ?></small>
<small class=”month”><?php the_time(‘M’) ?></small>
<small class=”year”><? // php the_time(‘Y’) ?></small>
</p>
</div><div class=”PostContent”>
<?php the_content(“<p>Selengkapnya… »</p>”); ?>
</div>
<div class=”PostDet”>
<li class=”PostCateg”>Kategori: <?php the_category(‘, ‘) ?>
</div>
</div>
<br clear=”all” /><ul class=”Note”>
<li class=”NoteTrackBack”><?php comments_rss_link(__(‘<abbr title=”Really Simple Syndication”>RSS</abbr> feed untuk komentar di sini’)); ?>
<?php if ( pings_open() ) : ?>
<li class=”NoteRss”>” rel=”trackback”><?php _e(‘TrackBack <abbr title=”Uniform Resource Identifier”>URI</abbr>’); ?><?php endif; ?>
<?php comments_template(); ?>
<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 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><?php _e(‘Tidak ditemukan’); ?></h2>
<p><?php _e(‘Maaf, materi yang Anda cari tidak ditemukan.’); ?></p>
<?php endif; ?>
</div><!– end center –>
<?php get_footer(); ?>
Sorry for not explaining clearly in previous message. I guess you are new to PHP ??
User the following code for the single.php
<?php get_header(); ?> <!-- start content items --> <div class="CON"> <!-- start content left --> <?php get_sidebar(); ?> <!-- end content left --> <!-- start center --> <div class="SC"> <p><img src="<?php bloginfo('template_url'); ?>/images/featured_img.gif" width="489" height="208" alt="" /></p> <?php if (have_posts()) : ?> <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 while (have_posts()) : the_post(); ?> <div class="Post" id="post-<?php the_ID(); ?>"> <div class="PostHead"> <h1><?php the_title(); ?></h1> <small class="PostAuthor">Admin: <?php the_author() ?> <?php edit_post_link('Edit'); ?></small> <p class="PostDate"> <small class="day"><?php the_time('j') ?></small> <small class="month"><?php the_time('M') ?></small> <small class="year"><? // php the_time('Y') ?></small> </p> </div> <div class="PostContent"> <?php the_content("<p>Selengkapnya... ?</p>"); ?> </div> <div class="PostDet"> <li class="PostCateg">Kategori: <?php the_category(', ') ?> </div> </div> <br clear="all" /> <ul class="Note"> <li class="NoteTrackBack"><?php comments_rss_link(__('<abbr title="Really Simple Syndication">RSS</abbr> feed untuk komentar di sini')); ?> <?php if ( pings_open() ) : ?> <li class="NoteRss">" rel="trackback"><?php _e('TrackBack <abbr title="Uniform Resource Identifier">URI</abbr>'); ?> <?php endif; ?> <?php comments_template(); ?> <?php endwhile; ?> <?php else : ?> <h2><?php _e('Tidak ditemukan'); ?></h2> <p><?php _e('Maaf, materi yang Anda cari tidak ditemukan.'); ?></p> <?php endif; ?> </div> <!-- end center --> <?php get_footer(); ?>
ok tq for your info.
Is the issue solved? If so change the status to resolved.
If not provide url to your site.yup…. all works good. the page naviation work properly. tq.
- The topic ‘Include individual page’ is closed to new replies.