WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. nearlynarik
    Member
    Posted 1 year 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

    http://wordpress.org/extend/plugins/post-tiles/

  2. nearlynarik
    Member
    Posted 1 year ago #

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

  3. nearlynarik
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year 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

About this Topic

Tags

No tags yet.