• I have 3 Posts and one Main post where I want to show all those 3 posts.
    Problem is that on that 3 posts I need to fill content with custom fields so this is what is happening :
    When I go directly http://www.blblb.com/post1 it’s all great, but when I go to ww.blblb.com/allposts I see nothing !
    Please can someone help me?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter yazmine

    (@yazmine)

    Do I need to put something in function.php so I can be able to do that?

    On single.php I have this:
    <?php if ( is_single(‘allposts’) ) {
    query_posts(“category_name=singlepost” . “&order=ASC”);
    if (have_posts()) : while (have_posts()) : the_post();
    the_content(‘<p class=”serif”>Read the rest of this entry »</p>’);
    endwhile; endif;
    }
    ?>

    The link to your site is not working, so I can’t see the examples you gave. However, I have a couple of suggestions.

    If your singlepost posts are empty, then your query may be working and displaying nothing. So, make sure that your query_posts is working by displaying something that you know has a value (like the title) from each post.

    If the query is working, you probably need to repeat the code in the loop that you use in the loop to fill post1, etc.

    Hope that makes sense.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom fields from other posts’ is closed to new replies.