• Hello, I just recently installed wordpress and I was wondering if it was at all possible to make it where, wordpress would show the first 5 maybe 10 post on the index page of the regular html site. Then if they clicked on the post it would take them to the actual blog page. Does anybody know how this can be accomplished. I don’t want to move my blog to my root, i’ve already styled up an html/css page, and having wordpress as my root is not the direction i wanna go in, just instead, use it to link to my index page. TiA

Viewing 15 replies - 1 through 15 (of 18 total)
  • You could add use rss on your homepage to display the newest blog posts on your homepage, then when they click they would redirected to your homepage.

    Yep, pulling RSS feeds is one good option.

    Another would be to have a look at Creating_a_Static_Front_Page and check out the “Integrating” sections.

    Thread Starter Anthony

    (@madburner)

    that sounds great, but exactly how do i go about in doing that?

    Read the article?

    Thread Starter Anthony

    (@madburner)

    okay, I think I get it now, It looks like in order to accomplish what I’m trying to do, I need to add a mini-loops to the static front right? If so, then do I first edit the index.php root of the blog folder to change to change/replace w/ this code.

    <?php
    $how_many=5; //How many posts do you want to show
    require_once(“wp-config.php”); // Change this for your path to wp-config.php file ?>

    <ol id=”whats-new”>
    <?
    $news=$wpdb->get_results(“SELECT ID,post_title FROM $wpdb->posts
    WHERE post_status= \”publish\” ORDER BY ‘ID’ DESC LIMIT “.$how_many);
    foreach($news as $np){
    printf (”

    • %s
    • “, $np->ID,$np->post_title);
      }?>

      Then i would assign a div id tag to my content body of my index.html page

      is that correct? Of course making the changes in the copied code to the correct directories

    1. It will not work in a html file.
    2. Do NOT edit your blog’s index: you are supposed to do all those edits in the index.php of your main site!

    Thread Starter Anthony

    (@madburner)

    I don’t have an index.php on my main site, only Index.html, So im just trying to show the blog content on the front page of the site (index.html). there’s another on the main site to point to the index.php root of the blog. But How do i go about and getting the blog post to show in my splash page. After reading those examples, they lead me to believe that you have to have an index.php, i can’t have an index.php on my root home page, only index.html

    Thread Starter Anthony

    (@madburner)

    HandySolo: That link you sent me to doesn’t show anything about intergrating an rss feeder into your html to pull from your blog page. Do u know of a method for rss feeding your Blog (index.php) to your Home (index.html(only)(root)

    just because you currently have an index.html doesn’t mean you can’t make it index.php instead.

    To tackle this from the rss feed angle, just google up a php rss feed puller and go from there. There’s a pile of ’em out there.

    Thread Starter Anthony

    (@madburner)

    Yep, that’s one. CG-FeedRead from https://www.chait.net/index.php?p=238 may be another (search here on the forums as I seem to recall the author of that one helping some folks with the same scenario).

    Thread Starter Anthony

    (@madburner)

    okay, this is getting a little bit too much for me. I’m better at designing then coding. Has anyone ever been able to successfully do this? Linking their blog home page to their index root homepage (html only) and have it display properly.

    (html only)

    No.

    Thread Starter Anthony

    (@madburner)

    okay, how do i go about in chaning my html files to php?

    Thread Starter Anthony

    (@madburner)

    Okay, im trying to follow the Mini Loop Static Front Tutorial but it’s kinda tricky to follow. Especially when i don’t know a thing about php.

    Okay i was able to get the static page front to show, but it only shows the title of the Link, i found out how to change title link to the actual post like by changing
    post_title to post_content, but how do I tell it to show everything,
    1. Name of Post, Date & Time , then the content.

    how do i include those information in the php code part

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Linking blog file root (index.php) into your index.html (hompage root)’ is closed to new replies.