WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] I want to put my blog output into my index page (13 posts)

  1. jetsi
    Member
    Posted 5 years ago #

    I have a website where I am able to post on Blogger and have the data show up on my own website by using the following code:

    <?php include ('/home2/modernje/public_html/httpdocs/includes/blogger_whats_on.html'); ?>

    I have WordPress installed in public_html/wpblog/. How can I get the output to show up on my site like Blogger does?

    If this has been answered already I apologize, but I have been searching posts for over an hour and can't find an answer.

    Thanks,

    Matt

  2. jetsi
    Member
    Posted 5 years ago #

    Thanks for the post.

    From those directions, it appears that the intention is to have WordPress publish the index page in the root directory. I do not want that, as I want the WordPress output to be a part of my index page, not the index page itself.

    I can get Blogger to change the output to html, can WordPress do the same?

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 5 years ago #

    You can have your wordpress posts show up on your webpage...is that what you want?

    I've just recently done that....you need to change your homepage to a .php rather than a .html and then put a bit of code in the head and a bit more where you want the posts

    http://codex.wordpress.org/Integrating_WordPress_with_Your_Website

    should help

    I have

    <?php
    // Include WordPress
    define('WP_USE_THEMES', false);
    require('../blog/wp-blog-header.php');
    query_posts('showposts=10');
    ?>

    just before my </head> tag

    and

    <div id="voodoorss">
          <?php while (have_posts()): the_post(); ?>
            <div class="dateIcon">
            <h5><?php the_time('M'); ?></h5>
            <p><?php the_time('j'); ?></p>
            </div>
            <div class="text">
            <h4><?php the_title(); ?></h4>
            <?php the_excerpt(); ?>
            <p></p>
            <a href="<?php the_permalink(); ?>">Read More...</a>
            </div>
            <br />
            <?php endwhile; ?>
        </div>

    in the body where I want my content

    in the first part,. the showposts number determines how many posts show up

    in the body part I've got the date and stuff coming with the exerpt of the post.

  4. From those directions, it appears that the intention is to have WordPress publish the index page in the root directory. I do not want that, as I want the WordPress output to be a part of my index page, not the index page itself.

    You can still do that. Make a template for how you want the page to look and then use a static front page and have it pull in the posts, so that it's run by WordPress but looks like you want your front page to look.

  5. jetsi
    Member
    Posted 5 years ago #

    You can have your wordpress posts show up on your webpage...is that what you want?

    Yes, that is indeed what I want. I used the changes you put in and I was able to get the permalinks to display, but I want the entire output, archive link, feed link, etc.

    In Blogger I was able to get the output of the blog as html which I could then include in my main content division on my site. Can I get WordPress to do the same, as I think the php within php is causing the problem.

    You can still do that. Make a template for how you want the page to look and then use a static front page and have it pull in the posts, so that it's run by WordPress but looks like you want your front page to look.

    If I had the slightest idea I might mess with that. Would I simply have to change the header, take all of the data from my html page and put it into the WP header?

    Thanks in advance.

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 5 years ago #

    well, once you have setup the example I showed, you can modify what you want displayed. In my example, I'm only showing the month, date, title (Permalink), and exerpt.

    You've gotta insert the things that you want to show, and style them appropriately.

    It works perfectly on my site here....
    http://thevoodooempire.com/blog.php

    that's not a wp site, it's just my basic webpage with my recent 10 posts brought in....

    Unfortunately I can't help much beyond what I've posted, as I only know how to do the things that I've already done.....

    ----
    If you want to check into the templates route just search for templates in the codex (docs) on the main wordpress site, all kinds of info

  7. jetsi
    Member
    Posted 5 years ago #

    Yes, what your site is showing is exactly what I want. And I am real easy, I want text on a white background, nothing fancy.

    You've gotta insert the things that you want to show, and style them appropriately.

    That is the problem, I don't know a lick of code, I am just copying and pasting and getting things to work but I really have no clue what I am doing. I am in the codex now to see if I can find anything.

    I will keep working at it, thanks.

  8. Rev. Voodoo
    Volunteer Moderator
    Posted 5 years ago #

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

    that's what I followed to do what you want.

    The tags you all need can be found in the codex....that's where I found them, I just had to look a bit since I didn't really know what I was look for either

  9. Rev. Voodoo
    Volunteer Moderator
    Posted 5 years ago #

  10. jetsi
    Member
    Posted 5 years ago #

    Allrighty, I think that is what I was looking for. At least it is a start. I now have the excerpts showing up, but I want the whole post. At least I have a place to start. Thanks for the info, I will keep plugging away.

  11. Rev. Voodoo
    Volunteer Moderator
    Posted 5 years ago #

    swap out the_exerpt for the_content

  12. jetsi
    Member
    Posted 5 years ago #

    Magnificent. That is exactly what I was looking for. I just put a link at the top and bottom saying "If you want to see the entire blog click here" which gave me the functionality if people wanted to see the extra stuff or comment.

    I picked out a nice theme with a custom header picture, so now I will work on customizing the entire content so it looks like the rest of my site.

    Other than that, I need to figure out how to edit the links widget to put in some of the links I want. I think it is in get_links.php but I am uncertain.

    Thanks for all your help RVoodoo and Ipstenu.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.