• Resolved Setu

    (@setu4993)


    Hello,

    I’m trying to figure out how to add my blogposts to my website’s blog page.

    Complete blogposts. Not just the first few lines as many other solutions offer.

    And if that’s not possible, I’m also open to editing the default wordpress page. The main purpose is to include my custom header, footer and sidebar PHP files there so as to have the links to my base pages.

    Looking forward to some help.

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • so you want to display WP posts on a non WP page?

    https://www.corvidworks.com/articles/wordpress-content-on-other-pages

    is the tutorial I followed.

    Thread Starter Setu

    (@setu4993)

    Yes, exactly that’s what I want to do.

    I read that already yesterday.

    But, this code there:

    <?php while (have_posts()): the_post(); ?>
    <h2><?php the_title(); ?></h2>
    <?php the_excerpt(); ?>
    <p><a href="<?php the_permalink(); ?>">Read more...</a></p>
    <?php endwhile; ?>

    Doesn’t this display just the permalinks? If so, what would be the suitable modifications I should be making so as to have the complete posts?

    Thanks!

    nope

    line 1 starts the loop
    line 2 displays the title
    line 3 displays the excerpt (a post summary) this can be swapped for the_content to display full post
    line 4 displays a read more link to the original article
    line 5 ends the loop

    Its a sample loop, you can modify, add, subtract whatever you like.
    Any loop function available in WP would be available on your site using this method

    I display the title, the excerpt, the read more, along with thumbnails

    https://thevoodooempire.com/blog.php is my non-WP page with posts added

    Thread Starter Setu

    (@setu4993)

    So you mean to say that if I replace ‘the_excerpt()’ with ‘the_content()’ on the third line, that would solve my job?

    And then, I would remove the ‘Read More’ link anyway ;)…

    Amazing! Thanks!!

    Yessir, that would do it

    You can look at loop examples in the codex for more info, or even look into WP themes for examples of template tags you can use, but you have the general idea

    Thread Starter Setu

    (@setu4993)

    That’s great :D!

    I’ll look into the loop examples again… Surely.

    I sure have got the general idea behind that now :).

    Template tags? What are those? I’m a newbie with WP…

    https://codex.www.ads-software.com/Template_Tags

    sorry, I meant to link that earlier. They are what you see throughout your theme telling Wp to display stuff

    Thread Starter Setu

    (@setu4993)

    Okay… I seem to get that now :).

    Thanks for all the help! I’m really grateful :).

    It’s no problem at all! Good luck!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Blog in external website’ is closed to new replies.