• hi all,

    Please help me, i am quite new in wordpress. i have installed a christmas theme and I do not want the index.php file to my homepage. I want single post to me by homepage.

    it mean every time I add a new post it should become the homepage..

    Hints : my idea is to create a index.php file which will check the latest article and redirect to that page.

    can anyone help me coding it?

    thanks in advance
    merry christmas

Viewing 1 replies (of 1 total)
  • you can set a page as the home page in settings, reading. to show a single post create a custom page template (google how to do this) and use the code below

    <?php query_posts('posts_per_page=1'); ?>
    
      <?php while (have_posts()) : the_post(); ?>
        <!-- Do special_cat stuff... -->
    
    <?php the_post() ?>
    <h2 class="entry-title"><?php the_title() ?></h2>
    				<div class="entry-content">
    <?php the_content() ?>
    
      <?php endwhile;?>
Viewing 1 replies (of 1 total)
  • The topic ‘Making Recent post/ Single post as homepage’ is closed to new replies.