• Hi all,

    I need help with integrating the titles of the last three blog posts into a static page. Searching the internet I found many people with similar issues (e.g. https://codex.www.ads-software.com/Creating_a_Static_Front_Page), but however none of the solutions worked for me.
    I already installed the runPHP plugin and activated it for the corresponding static page. So I think I’m doing something absolutely wrong.

    So my suggestions would be to take it stepwise.
    1. I am assuming I need a special template php file. Further I think, I need a static page to be written by “Writing > Pages” and including the static text to be displayed at top of the page.
    2. Somewhere I need to tell WP that I want the titles of the last three blog posts. Where should I insert that code? Into the static page (already running runPHP) or into the special template file?
    3. In the corresponding file (template/static), where should I put that code?
    4. What code should I insert? As mentioned above I already found a similar request, but it didn’t work out for me.
    5. At this point I would tell you what kind of error appears with my site ??

    I know, I am asking for much, but you would really help me. This is the last part on my way to set my entire page and so I am waiting and searching and looking and again waiting … ??

    If you need any other information, please let me know.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Instead of “assuming” – just simply tell WHAT do you want to do and let us tell you the HOW.

    So, do I understand well, you want to use the frontpage option from admin > Options > Reading and you want that Page to display your welcome text and the latest 3 posts. Right?

    If I guessed correctly, I wrote up a quick tutorial how to do it.

    If my guess was wrong – post back.

    Thread Starter oce

    (@josepo)

    Hmm your guess was partially correct ??

    So, I have to see into it with the front page. Actually it should be that guests come to my website and see page A. This page A includes the static text and the titles of the last three posts (not the entire post, only the titles).
    These titles should link to another page B. Page B is nothing but a usual blog site including all posts (titles and full posts).

    Do you understand, what I want?

    Thanks for your help!

    Page B you also select in Options > Reading (it is good to look around in your own admin panel… sometimes)
    A static page (selected)
    front Page: A
    posts page : B

    And you apply all that you read in my tutorial to Page A.

    The individual post title will NOT link ever to the Page B. Titles are permalinks and they link (as it should be) to the so-called single post view. Period.
    You can have a link in your navigation that links/point to your Page B.

    It is that simple.

    Thread Starter oce

    (@josepo)

    Well, I have set A to be the front page. What should I take for page B? It’s showing only static pages. Do I have to artificially write an empty one for this?
    I am asking, because I just tried to set another static page to be the posts page. As a result all content from the static page disappeared and only the posts show up. So I guess I have to write an empty static page and to set this one to be the posts page.

    But back to page A. I have set page A to be the front page. And indeed, if I go to the blog, it shows up. But, here comes the problem – no posts, no titles. Nothing is shown at the end or whereever on that page A.

    By the way thanks for your patience. I overlooked the option in the admin section.

    Thread Starter oce

    (@josepo)

    It’s working! Page A is working. You’re genious! Hooray ??

    Leaving only the question for the empty page B ??

    Yep, just create an empty Page – name it… Blog (?) and select it for “posts page”.

    Glad the little code worked!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Integration of static page with blog posts’ is closed to new replies.