• Resolved archjedi

    (@archjedi)


    I’m using 2.1.3
    The goal is a static page with the recent posts under the custom html for the static page. I’m not sure if the best way is to add code to the static page template, or code to the page content with a runphp plugin.

    I know nothing of PHP, but I did manage to get some code from the loop tutorials that added the titles of the last 5 posts. Now how do I get the title and content, author date to display also?

Viewing 2 replies - 1 through 2 (of 2 total)
  • My preference has been to put the PHP on the template pages, just because putting directly in the page content seems less secure and apt to be harder to find and modify if something goes wrong. I also edit the theme pages locally and upload them with FTP, which makes it possible to use an editor that does syntax color coding and such. One trick that’s made life a bit easier in sites with several custom templates is to use a convention like “tpl_sitemap.php, tpl_events.php, etc.” so that the templates are grouped together in the list of files in the theme.

    If you’ve managed to get the title printed, I’d expect that the list of other options at Template Tags would get you to the next level. If not, if you post a specific code snippet, it might be easier to suggest what to put where.

    Hope that helps.

    Thread Starter archjedi

    (@archjedi)

    Very nice! Thank you. Led me right to it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Static page with recent post integration?’ is closed to new replies.