• jewessel

    (@jewessel)


    I have inherited a WP site & it’s custom theme. It is a bit wonky and I am trying to rebuild it here and there to take advantage of the The Loop. My problem is that I have a template with the loop in it, and it is not flowing the existing posts into it. I have read that other had success with re-caching, using a different theme, and turning off all plug-ins to see if that helped them narrow down the problem. I have tried all, to no avail.

    My General>Reading settings are on “Front page displays: your latest posts” – although I’ve got a static front page, and I want the posts to appear on an internal page.

    My template file is named page_about.php and I’ve listed the file below. I currently have content on the page that has been entered on the Page interface with the “about” template activated. Here is the page: https://friendskc.org/index.php/about/news-and-events/

    Can anyone help me figure out how to get the posts flowing in there so that we don’t have to enter information in posts and in pages?

    Thanks!!!

    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 11 replies - 1 through 11 (of 11 total)
  • esmi

    (@esmi)

    My General>Reading settings are on “Front page displays: your latest posts” – although I’ve got a static front page, and I want the posts to appear on an internal page.

    Well, that’s wrong for a start…

    Try setting up a static front page correctly first.

    Thread Starter jewessel

    (@jewessel)

    I tried changing that, and it is problematic, as the previous developer has built the front page as static html and it isn’t available to me as a page in the dropdown menu in the General>Reading settings.

    Thread Starter jewessel

    (@jewessel)

    Here’s the code if you need to see it:
    https://wordpress.pastebin.com/8cdmPG1S

    esmi

    (@esmi)

    Convert the standalone html page into a custom page template, create a new page, apply the template and publish it.

    Thread Starter jewessel

    (@jewessel)

    Okay. I made a Home template, created a blank page & applied the Home template to it, then went in and set up the static page as Home and the Posts page as News & Events. That worked for the front page, but it also displayed the front page template on the News & Events page.

    Arg!

    esmi

    (@esmi)

    What file name did you give to the new template? Your News & Events page will be using the theme’s index.php template file.

    Thread Starter jewessel

    (@jewessel)

    I named the homepage template “Home” and the filename is home.php The News & Events page is using the “about” template whose filename is page_about.php (you can see it in the pastebin).

    esmi

    (@esmi)

    Don’t call any page template home.php. That’s a reserved file name on some servers and it can cause all kinds of problems/confusion on some WP sites. If you rename it front-page.php, it will be applied to the site’s front page automatically. If you want to assign it manually, call it something like homepage.php.

    Thread Starter jewessel

    (@jewessel)

    I only have access to the files via the wp editor window. Can I create a new file via that editor? I guess I need to get their FTP info.

    esmi

    (@esmi)

    I’d definitely ask for FTP login details. It’s always better to have it as a backup in case you make a mistake and the theme throws a fatal error.

    Thread Starter jewessel

    (@jewessel)

    Thanks for your help. I’ll post when I make some progress.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Posts not populating the loop’ is closed to new replies.