WordPress.org

Ready to get started?Download WordPress

Forums

Post Tiles
[resolved] How Can I Add The Post Tiles In Index.Php (6 posts)

  1. Theater Balcony
    Member
    Posted 1 year ago #

    Dear Team,

    I was Trying to insert the Post Tiles in my index.php. as menttioned in the installation section I tried adding [post-tiles categories='5,7,10,11,1965'] into Index.php. However obviously I ended up getting the line got printed in my home page since it is not a php.

    Can you please help me to get the php for getting the above mentioned short code to be called from the template (index.php) rather than from the page or post.

    So Something Like : <?php if (function_exists("Post_tiles")){ post_tiles(5,7,10,11,1965); }; ?>

    Thanks.

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

  2. ethanhackett
    Member
    Plugin Author

    Posted 1 year ago #

    I wish WordPress' support section would let me flag support threads as hot topics or important. Here's the a solution that worked for nearlynarik

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

    http://wordpress.org/support/topic/inserting-into-homepage-with-indexphp?replies=5

  3. Theater Balcony
    Member
    Posted 1 year ago #

    Dear ethanhackett,

    Thanks a lot for helping with that. Its really worked. I would really request you to add this information in the installation section of the plugin page in WordPress.org.

    Also would like to ask you one more question that I am getting only four tiles. In my page I have 3 in the top row and only one in the next row, Is there any ways I can add two more tiles. Please Have a look at theaterbalcony.com

    Thanks :)

  4. ethanhackett
    Member
    Plugin Author

    Posted 1 year ago #

    Yes. there are usually two reasons for only displaying 4 tiles. Usually it's either you only have 4 tiles that match the categories used by post tiles or in the short code you can control how many posts are being displayed by adding or changing the posts= to posts="6" or posts="9" etc.

  5. Theater Balcony
    Member
    Posted 1 year ago #

    Thanks Done With That :) I did not add posts parameter. Now everything works fine. Thanks for helping :)

  6. shrewdaimee
    Member
    Posted 10 months ago #

    Thanks you both for this Q! And thanks Ethan for a great plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic