Changing posts in pages (php) (7 posts)

  1. donouwens
    Posted 5 years ago #

    Hi everyone,

    I have this amazing theme, but I just want to change one small thing.
    On the homepage it shows the latest post, but I want to change this to pages.

    I checked the editor, but I'm not sure what to change anymore. Anyone that could/would help?

    This is the php coding:

    <?php get_header(); ?>

    <?php $i = 0; ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); $i++; ?>
    <div class="span-8 post-<?php the_ID(); ?><?php if ($i == 3) { ?> last<?php } ?>">
    <h6 class="archive-header">" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title() ?></h6>
    <?php get_the_image( array( 'custom_key' => array( 'thumbnail' ), 'default_size' => 'thumbnail', 'width' => '310', 'height' => '150' ) ); ?>
    <?php the_excerpt(); ?>
    <?php if ($i == 3) { ?><div class="archive-stack clear"></div><?php $i = 0; } ?>
    <?php endwhile; endif; ?>

    <div class="clear"></div>

    <div class="navigation clearfix">
    <div><?php next_posts_link('« Older Entries') ?></div>
    <div><?php previous_posts_link('Newer Entries »') ?></div>

    <?php get_template_part( 'bottom' ); ?>
    <?php get_footer(); ?>

  2. Chip Bennett
    Theme Review Admin
    Posted 5 years ago #

    What exactly do you want the Homepage to display?

    Do you want to display a specific Page?

  3. donouwens
    Posted 5 years ago #

    Well basically I want everything to stay the same as it is now (check http://www.donouwens.com). Only I want instead of the three posts that are shown now is to have links to three pages there. To the blog, a personal page and a third tba page (all non-existing yet). All with a description, just like the posts have now.

  4. Chip Bennett
    Theme Review Admin
    Posted 5 years ago #

    Honestly, I would create a custom frontpage template (frontpage.php), in which you have your image, plus a Widgetized "sidebar". Then put three text Widgets into the Widgetized "sidebar". In each of the text Widgets, put the Title, link, and description for each of the Posts/Pages that you want to link.

    That would be the easiest way, I think.

  5. donouwens
    Posted 5 years ago #

    Sounds like a fine suggestion, but I have no idea how to make it! :S

  6. 123milliseconds
    Posted 5 years ago #

  7. donouwens
    Posted 5 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic