Support » Plugin: Insert Pages » PHP generated page

  • Resolved sagiet

    (@sagiet)


    Hi,
    I hope you have some advice. I want to use your plugin to make a static front page on my website, with different widget boxes showing different news,
    and for these news to expire within a certain period of time.
    I’m using pods to create a custom post where the editor can write the content, and use a custom field were they add an expiring date for this post.

    What I think will work is to make a page for each of the different widgets, and then use a PHP code to display the right post on the the right page,
    and then use your plugin to show the different pages in the different widgets.
    What I can’t find out is the PHP code, and where to put this code to show the right post on the page.
    I know this is outside of the scope of plugin support, but I have seen the help forum and it looks like you like to help, so I give it a try.
    And I really like this plug in, it will make the home page become a living editor generated news page 🙂
    I hope you can help, thank you in advance.

Viewing 1 replies (of 1 total)
  • Plugin Author Paul Ryan

    (@figureone)

    You should be able to do most of this without using the Insert Pages plugin, by editing your theme templates. If you’re just interested in editing the static front page, you can modify the home.php template in your theme. There you can manually create divs that display specific WP_Query() output for your different widgets, and you can filter your WP_Query results by the specific meta_value you’re using for expiration dates.

    All of this is relatively complex theme development, so good luck in your search! Some good resources are here:
    https://developer.wordpress.org/themes/basics/the-loop/#creating-secondary-queries-and-loops

Viewing 1 replies (of 1 total)
  • The topic ‘PHP generated page’ is closed to new replies.