Forums

[resolved] Posts on inside pages (4 posts)

  1. MrHOG
    Member
    Posted 2 years ago #

    Hi
    I'm new to wordpress and I've learned to use it by just browsing around.
    but now there's a problem i cant resolve.
    I'm trying to put posts on the inside pages with the same code that puts the posts on the home page, with a plug in I found in here and with codes i find browsing the web, but nothing works... what it does it puts the text that I put on the page that I've created and puts it as a post.
    any ideas in how to put a post on an inside page?

  2. vtxyzzy
    Member
    Posted 2 years ago #

    Please explain what you mean by 'inside page'. A link to the site and an example might help.

  3. MrHOG
    Member
    Posted 2 years ago #

    I'ment all pages generated by page templates, but i finally got it.
    thanks anyways vtxyzzy :P

    i don't know what i was doing wrong with the code but now its running fine with this code i compile from some codes i found, i called it frankenstein... is in the frankenstein div:

    <div id="blog_text">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h2>" rel="bookmark"><?php the_title(); ?></h2>
    <?php the_content(__('Read more'));?>
    <?php endwhile; else: ?>
    <p>There has been a glitch in the Matrix.
    There is nothing to see here.</p>
    <p>Please try somewhere else.</p>
    <?php endif; ?>
    </div><!-- end #blog_text -->

    <div id="frankenstein">
    <?php query_posts('category_name=news&showposts=5'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <h2>" rel="bookmark"><?php the_title(); ?></h2>
    <p>Written on <?php the_time('F j, Y'); ?> at <?php the_time() ?>, by <?php the_author() ?></p>
    <?php the_content(__('Read more'));?>
    <div class="postmeta">
    <p><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>
    <p>Category <?php the_category(', ') ?> | Tags: <?php the_tags(' ', ',', ' '); ?></p>
    </div><!-- end .postmeta -->
    <?php endwhile;?>
    </div><!-- end #frankenstein -->

  4. MrHOG
    Member
    Posted 1 year ago #

    i found a correct solution for this problem
    just define a pagename that you want to display in that particular div <?php query_posts('pagename=services'); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic