• So I have a site up and running, but I’m not quite sure how call posts to the page and I really don’t understand post page.

    From what I understand this code

    <?php wp_insert_post( $post, $wp_error ); ?>

    tells WordPress to insert posts to a page wherever this code is inserted?

    I tried that and I get nothing on the page. https://www.utahlibertylaw.com/blog/

    Also, it appears to me that when I go to create a post wordpress is creating a new page each time. However, I’d only like to have posts appear on that specific page https://www.utahlibertylaw.com/blog/

    So, what is the trick to getting this done and also the trick to have posts of a specific category called? thx

Viewing 3 replies - 1 through 3 (of 3 total)
  • wp_insert_post() puts post data into the database. Post data is pulled onto the display through the Loop – a section of code that has this in one form or another:

    if (have_posts()) : while (have_posts()) ; the_post();
       // Post data is displayed here
    endwhile; endif;

    If your front page is a ‘static page’ as set in Admin->Settings->Reading, then you select which Page is the ‘Blog’ page there also.

    If you already have a ‘Blog’ page set there, but want another similar page, take a look at the Blog In Blog plugin.

    If this does not answer the question, please explain more.

    Thread Starter BrianBam

    (@brianbam)

    Thanks I think your post will be really helpful.

    So, I inserted this into the body of page that I created. I selected that custom page for the blog page.
    https://www.utahlibertylaw.com/blog/

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <?php endwhile; endif; ?>

    I then went to Settings > Reading and selected “Blog” from the drop down list for “Post page:”

    I then created a post but nothing displayed on this page.

    https://www.utahlibertylaw.com/blog/

    Instead I got this page at and the funny thing is that the page main nav is missing and of course the layout is all foobared. So, it must be pulling another page to display the blog.

    Here is what I’m really trying to get (you have to click on the images to see the real desired layouts)
    https://www.utahlibertylaw.com/desiredsummarypostpage/

    and this

    https://www.utahlibertylaw.com/desiredsinglepostpage/

    thanks for any help.

    This is probably too complex to handle in this forum. You may need to hire someone to help. You can post a free job request at jobs.wordpress.net

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Linking post to specific page.’ is closed to new replies.