WordPress.org

Ready to get started?Download WordPress

Forums

Post Tiles
[resolved] Post-tiles breaks smooth-slider (7 posts)

  1. pjablonski
    Member
    Posted 1 year ago #

    Hi,
    Want to use post-tiles with smooth slider. Using the atahualpa theme. If I just have the smooth-slider it works fine. If I place post-tiles below the smooth slider on the same page, only post-tiles works and smooth-slider disappears. Disable post-tiles and smooth-slider reappears. If I place post-tiles before smooth-slider then smooth-slider is shown, however the text in the slider is messed up.

    This is the code in my index.php that results in smooth-slider disappearing:

    <?php if ( is_front_page() and (function_exists( 'get_smooth_slider_category' )) ) { get_smooth_slider_category('latest-news'); } ?>

    <?php if ( is_front_page()) { echo do_shortcode('[post-tiles]'); } ?>

    Interestingly, if I use the wp-tiles plugin instead of post-tiles (substituting the appropriate shortcode as above), smooth-slider works fine.

    Any thoughts why this might happening. I'd really like to use post-tiles but need to have it appear below the smooth-slider on the home page.

    Thanks for reviewing.

    Pete

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

  2. pjablonski
    Member
    Posted 1 year ago #

    Think I have a handle on this. It looks like the culprit is having jquery.js (or jquery.min.js) called twice (once by Smooth Slider and once by Post-Tiles). If I turn off jQuery Category Sorting and Animation, smooth-slider appears properly as does post-tiles.

    If I comment out line 446 in post-tiles.php
    echo "<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script>";

    and enable jQuery Category Sorting and Animation, smooth-slider and post-tiles appear correctly. I will play a little bit more with this to see if there are any functional issues, but at least I think I'm headed in the right direction. Any thoughts appreciated.

  3. pjablonski
    Member
    Posted 1 year ago #

    I'll consider this resolved. Thanks for a great plugin!

  4. omniflo
    Member
    Posted 1 year ago #

    Hi Pjablonski,

    I am having the same issue with another theme zenon. I'm not the greatest with editing sourcecodes etc. by your comment "If I comment out line 446 in post-tiles.php
    echo "<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script>";"

    Do you mean to remove this line from the code?

  5. pjablonski
    Member
    Posted 1 year ago #

    Hi Omniflo,

    You could remove from the code, but I wouldn't recommend it as you may want to go back to it. It's simpler to comment out the line like this:

    //echo "<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script>";

    There are a few ways to comment out a line (so that php ignores it) and I've used two forward slashes (//) at the beginning of the line (bolded above for emphasis; you of course would not bold in the code).

    Hope that helps.

  6. ethanhackett
    Member
    Plugin Author

    Posted 1 year ago #

    Also keep in mind once you update the plugin you'll have to go back and comment it out again. I thought I had the code check to see if query was already available so it doesn't cause redundancies. I'll look into fixing it.

  7. ethanhackett
    Member
    Plugin Author

    Posted 1 year ago #

    P.s. Pjablonski thanks for your help!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags