Post Tiles
Inserting into homepage with index.php (5 posts)

  1. nearlynarik
    Posted 3 years ago #

    I'm looking to replace a slider in my theme with this plug in. I was wondering if there was any php code that could be used instead as shortcodes obviously don't work in the index.php file.

    thank you


  2. nearlynarik
    Posted 3 years ago #

    I figured it out.
    I used this: <?php echo do_shortcode('[post-tiles]') ?>

  3. nearlynarik
    Posted 3 years ago #

    the problem i'm now having with this is that i can't use any of the modifiers eg posts or categories. I keep getting a T_LNUMBER parse error. Any ideas on how to get around that?

  4. nearlynarik
    Posted 3 years ago #

    I discovered the solution. You need to use double quotation marks, not single.

    eg categories="10" or posts="8" rather than categories='10' or posts='8'.

    To summarise, I replaced an image slider with post tiles using the following code in the index.php file of a theme.

    <?php echo do_shortcode('[post-tiles categories="51,6" posts="10"]') ?>

  5. ethanhackett
    Plugin Author

    Posted 3 years ago #

    Awesome thanks for sharing this. This could help others looking to embed Post Tiles elsewhere. I'll revisit this and find a way to put this in the documentation for others.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post Tiles
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.