WordPress.org

Ready to get started?Download WordPress

Forums

WP Tiles
[resolved] Loop wp-tiles (14 posts)

  1. hiphopruckus
    Member
    Posted 1 year ago #

    I am trying to loop wp-tiles by category for each of the different archive pages. How would i do this. I absolutely love this plugin by the way.

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

  2. Mike
    Member
    Plugin Author

    Posted 1 year ago #

    Hi hiphopruckus. I'm happy you like the plugin. In version 0.3.3 of the plugin (uploaded just now), I added a function the_wp_tiles(), which you can use in your theme files. If you put this in your category template, it will automatically show only posts in that category.

    <?php if ( function_exists ( 'the_wp_tiles' ) ) the_wp_tiles(); ?>

    Cheers,
    Mike

  3. hiphopruckus
    Member
    Posted 1 year ago #

    Thanks Mike. I have a few more questions. Are you gonna to eventually make this plugin into a widget? Also, I have a new theme and am having trouble trying to get the featured image to show up. Alot of times, i have posted an image and the theme (fanwood) automatically creates a thumbnail image on hiphopruckus.com after uploading from my harddrive. ALot of times, I don't designated an image as featured. Are you going to make it possible in the next iteration for the post-tiles plugin to find the image from a post even if it's not featured?

  4. Mike
    Member
    Plugin Author

    Posted 1 year ago #

    Hi hiphopruckus, does the plugin not take images from posts without a featured image on your website? It should already fallback to either the first attached image, or else the first <img> tag in the post itself. If it doesn't, do you have a demo page I can check out?

    As for adding a widget to the plugin, I hadn't considered it, but it would actually be an option for themes with wide widget areas. I'll think about it.

    Cheers,
    Mike

  5. hiphopruckus
    Member
    Posted 1 year ago #

    Hey Mike,
    Yeah, it doesn't take the first image i post that is used as a thumbnail.
    It only looks for the credentials of "featured". How do i work around this?

    Also,
    The reason why i needed to get a widget is because the plugin shortcode doesn't work on my archive pages. Is there a workaround for this.

  6. hiphopruckus
    Member
    Posted 1 year ago #

    Also i used wp-tiles plugin, it automatically finds the image with out looking for the featured.

  7. Mike
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Hiphopruckus, I'm confused. You're saying WP Tiles does find the image even if there's no featured image?

    Then, with your category archive pages, did the function I posted earlier not work with version 0.3.3? Does it load the wrong posts? What happens?

    Mike

  8. hiphopruckus
    Member
    Posted 1 year ago #

    Yes. Wp-tiles does find the image with no featured image. Yes.

    concerning the category archive pages, when i put the short code in the php side of things it just reads back the short code.

  9. Mike
    Member
    Plugin Author

    Posted 1 year ago #

    Try putting this code in your category.php, instead of the shortcode:

    <?php if ( function_exists ( 'the_wp_tiles' ) ) the_wp_tiles(); ?>

    Also, make sure the plugin is updated to version 0.3.3.

  10. hiphopruckus
    Member
    Posted 1 year ago #

    Ok,
    How do i write an if then conditional statement for different categories.

  11. Mike
    Member
    Plugin Author

    Posted 1 year ago #

    It should automatically take the current category already. If you want to add a specific category, add it to the arguments along the following lines:

    <?php
    $the_cat_id = ID_FOR_YOUR_CATEGORY;
    $args = array (
        'posts_query' => array (
            'cat' => $the_cat_id
        )
    );
    the_wp_tiles ( $args );
    // (untested)
    ?>
  12. hiphopruckus
    Member
    Posted 1 year ago #

    Mike, sorry for asking you so many questions, but i just love this plugin.
    By the way,
    I want to display in 3 posts across instead of 2 for which is the way the plugin is setup. How do i do this?

  13. hiphopruckus
    Member
    Posted 1 year ago #

    Can I replace the_wp_tiles with post-tiles for your plugin. I'm not using Wp-tiles after finding out about post-tiles.

  14. hiphopruckus
    Member
    Posted 1 year ago #

    Hey are you ever gonna add pagination to this plugin? That would be excellent if you did.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.