cryout serious slider doesn't reset the $post global

  • Author
    Posts
  • #38480

    <diddledan> WebDragon: bug in the plugin
    <WebDragon> diddledan, oh? where at
    <diddledan> WebDragon: it doesn’t reset the $post global after trampling all-over it
    <WebDragon> derp
    <WebDragon> so it only works from within, or after the_content()
    <WebDragon> well that’s annoying.
    <diddledan> no, it’ll cause all manner of side-effects even if used within the_content()
    <WebDragon> huh. it otherwise appears to work fine, but I’ll let the author know, tute le suite
    <diddledan> e.g. running any the_*() function after running the shortcode will either not output anything or output from a different post
    <WebDragon> appreciate your help in diagnosis

    Was running into an issue trying to insert the shortcode before a call to the page content for front-page.php and having all the content section go away.

    Thought you should know right away so it could be corrected 🙂

    I’d have posted in a more appropriate forum, but I didn’t see one for your plugins, and wasn’t sure how often you read the WP support forums directly.

    #38572
    Kay
    Cryout Creations mastermind

    Thanks a lot for the info. We’ll investigate this issue further and we’ll release an update ASAP.

    We’ll also create a dedicated forum for it.

    Thanks again!


    Before posting consider reading our short theme debugging instructions.
    Please read the FAQs: MantraNirvanaParabolaTempera
    Tutorials: custom menustranslating themeinstalling themecategory page with introdisabling comments Wordpress: child themescategories/posts
    Before making any modifications to your theme we strongly recommend using Child Themes.
    #38610
    Kay
    Cryout Creations mastermind

    Hi again,

    Could you also tell us what theme you were using? Also, could you give us a little more details about where exactly in frontpage.php were you inserting the slider shortcode?


    Before posting consider reading our short theme debugging instructions.
    Please read the FAQs: MantraNirvanaParabolaTempera
    Tutorials: custom menustranslating themeinstalling themecategory page with introdisabling comments Wordpress: child themescategories/posts
    Before making any modifications to your theme we strongly recommend using Child Themes.
    #38766

    the theme we were using was the Sage package from https://roots.io/sage/ to create a custom bootstrap-based theme, and we were using a created front-page.php file consissting of

    <?php while (have_posts()) : the_post(); ?>
      <?php // get_template_part('templates/page', 'header'); ?>
      <?php get_template_part('templates/content', 'slider'); ?>
      <?php get_template_part('templates/content', 'page'); ?>
    <?php endwhile; ?>

    the relevant template part being in templates/content-slider.php :

    
    <?php
    echo do_shortcode( '[serious-slider id=4]' );
    wp_reset_query(); // which we had to add due to the bug
    ?> 
    • This reply was modified 8 years ago by webdragon.
Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘cryout serious slider doesn't reset the $post global’ is closed to new replies.