• I’m trying to make my blog’s homepage a combination of static content and a couple of recent block posts. I know that it’s supposed to work that way by changing a setting. But when I go to dashboard > settings > reading and select show static page and then select the page for the static setting and then the “posts” dropdown settings there are not any post pages to add. Just pages are listed — no posts.

    I’m using Twentyten theme.

    Am I missing something?

Viewing 10 replies - 16 through 25 (of 25 total)
  • No – “static” generally means no posts. If you want static content and your recent posts, I suggest that you switch your front page back to your recent posts in Settings -> Reading and look into editing your theme’s index.php template file to incorporate the static content that you want.,

    Thread Starter creativepart

    (@creativepart)

    I thought of doing that first, but got the impression that this was a simply one/two process with the blank page set in the second drop doing of the reading settings.

    Sorry – no. You cannot achieve what you want without editing at least 1 of your theme’s template files.

    I thought you wanted a static front page with just a few posts pulled into it AND a blog page.
    That is what I tried to help you with.

    If you want your post page to simply have some static content at the top, do as Esmi says and add your static content to your themes
    index.php file…
    And because you are not using a child theme, make sure you copy any changes you make (to your harddrive – save the template file) as they may be overwritten in WP updates.

    I have done this before and used loop-index.php
    and added this:

    <?php if ( is_home() ) { ?>
    
    	<div id="intro">
    all your html here
    
    </div>
    <?php } ?>

    just above the Start the loop

    Thread Starter creativepart

    (@creativepart)

    I thought you wanted a static front page with just a few posts pulled into it AND a blog page.

    Yes, that’s what I’m saying. That is what I would like. I’d like to have my static content homepage, and the newest block post below the static content. Of course, there would still be the blog we have set up.

    I do like the option you’ve proposed, as well. Thanks for your help I’m sorry I couldn’t decipher your instructions.

    All the direction you need to do this on this thread.
    But here’s some help:

    First make a child theme:

    If you haven’t made any direct changes to any of the theme files
    you can make a child theme by:

    create a folder called:
    beanstwentyten
    in that folder place a style.css file that says:

    /*
    Theme Name: Beans Twenty Ten
    Description: Child theme of the Twenty Ten theme
    Author:
    Template: twentyten
    */

    @import url(“../twentyten/style.css”);

    Now upload (ftp) or (Cpanel) this folder to your wp-content/themes directory

    Then go to Appearence — themes- and activate it

    Now you have a child theme.

    —————————————-
    The directions below can now be carried out in the child theme.

    This is what the front-page.php template could look like with the code to pull your latest (1) blog post to the front.

    https://pastebin.com/nEaTD8ZW

    You will need to adjust the css styles to make it look pretty.

    (You would upload this template to wp-content/themes/beanstwentyten)

    Now you set : Static — home
    You Create the Home Page in the editor (if you are calling your current static page home page)
    then Open it in the editor and
    change the template from default to the new front-page.php template (on the right sidebar of the edit pane)

    Now you should have a static front that looks just like your current static front with a post link and excerpt below. (you will have to make the css to make it look like you want)

    ————————– If you don’t make a child theme—-
    The big caveat to this is that you never created a child theme and your are editing TwentyTen directly.
    I urge you to take a back up of the theme folder every time you make a change to it.

    (FTP — download theme folder) After every tweak… all it may all be over written

    hth

    Thread Starter creativepart

    (@creativepart)

    Thank you. I’ll give this a try. I appreciate your patience and your help.

    I’m somewhat new to WordPress and trying to learn some new things. I followed the instructions in this post in order to have my static home page pull posts from my blog. It worked pretty good using the code, but I encountered a few problems. I’m using the Twenty Ten theme.

    1. My custom menu for the top navigation bar disappeared and it appears that WordPress reverted back to the default menu. My original CSS file was imported in the child theme and nothing was changed (no styles were added), so I don’t know how this change took place.
    2. The sidebar was pushed down below the posts. In other words, you have to scroll down the first page to find the start of the sidebar.

    Below is the entire code of the new page.php template file I placed in the child theme folder (I used my original page.php file’s code and added the first few lines of code provided in this post to the top):

    [Way too much code for here and it was likely corrupted as it was not posted using the code buttons. Please use the pastebin.]

    Additionally, two things I would like to know how to do:
    1. Make the post titles remain as a link, but not look like a link…just simply look like a bold texted, h3 title.
    2. Have an image appear to the left of the post excerpt and under the title, similar to the actual blog page.

    I deactivated my child theme, but here is the link to the site I am trying to develop:

    https://www.laketahoeweddings.net

    Thank you for any solutions.

    Kenny

    I realized that there was a missing div tag from the code above;

    <div id=”frontpagepostpull”>

    This took care of the sidebar from being pushed down, but I still have the other problems listed. Thanks again for any help.

    Kenny

    Hi Kenny, Can you please start a new thread — this one is very old, and actually, your issue is not likely to be the same, even if it seems similar. Also please see the forum rules re: posting code:

    https://codex.www.ads-software.com/Forum_Welcome#Posting_Code

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘Adding Blog to static page’ is closed to new replies.