0

I want to integrate WP Tiles directly into our Wordpress theme and into our existing loop but their documentation is pretty thin and I can't find much in the way of examples so not really sure how to go about it...

Apparently, we can use template tags and specifically:-

if ( function_exists ( 'the_wp_tiles' ) );

The below is our existing loop:-

<?php if ( have_posts() ) : ?>
    <?php $i = 0; ?>

    <?php /* Start the Loop */ ?>
    <?php $postNumber = 1; ?>
    <?php while ( have_posts() ) : the_post(); ?>
        <?php $i++; ?>
        <?php include(locate_template('content-summary.php')); ?>
    <?php endwhile; ?>
<?php endif; ?>

Like I say, I have no idea how to use the template tags in this existing loop:-

        <!-- start the_loop_wp_tiles -->
        <?php if ( have_posts() ) : ?>
            <?php $i = 0; ?>
            <?php if ( function_exists ( 'the_wp_tiles' ) ) : ?>
                <?php /* Start the Loop */ ?>
                <?php $postNumber = 1; ?>
                <?php while ( have_posts() ) : the_post(); ?>
                    <?php $i++; ?>
                    <?php include(locate_template('content-summary.php')); ?>
                <?php endwhile; ?>
            <?php endif; ?>
        <?php endif; ?>

        <!-- end the_loop_wp_tiles -->

Doesn't matter what I try but if ( function_exists ( 'the_wp_tiles' ) ) : always returns false.

Can anyone point me in the right direction? If a moderator could add the tag wp-tiles to my post please that would be great.

  • What did WP Tiles support say when you contacted them? 3rd party plugins are off topic here. Have you activated the plugin? – Tom J Nowell Mar 19 '15 at 20:25
  • Also are you aware that include(locate_template('content-summary.php')); is that same as get_template_part('content', 'summary' );? You should use get_template_part instead – Tom J Nowell Mar 19 '15 at 20:27
  • Not had a reply back from their support yet, ah sorry, I had seen other posts referring to plugins before, I thought on here but maybe that was Stack Overflow. Thanks for the advice, I think there was actually a reason we had to use locate_template instead of get_template_part but I can't remember what that was now. – zigojacko Mar 20 '15 at 8:27
  • If you're building your own plugins then that's okay, but with 3rd party plugins everyone involved needs a good understanding of that plugin which isn't always possible – Tom J Nowell Mar 20 '15 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.