WordPress.org

Ready to get started?Download WordPress

Forums

Dynamic Widgets
[resolved] Bug in pages with multiple queries (6 posts)

  1. Diogo15
    Member
    Posted 3 years ago #

    Is this the right way to report a bug??

    Pages with multiple queries, doesn't show the dinamycs widgets!

  2. Qurl
    Member
    Plugin Author

    Posted 3 years ago #

    Can you please give me a bit more info? What do you mean with 'multiple queries'? What exactly is going wrong? Which theme are you using?

  3. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    probably not a bug, but bad programming.

    do all multiple queries reset the query_string by using wp_reset_query(); after their respective endif;s ?

  4. Diogo15
    Member
    Posted 3 years ago #

    I hope the problem will not be bad programing!

    I create a new WP_QUERY, to query diferent post in CUSTOM POST TYPES and TAXONOMIES!....

    http://codex.wordpress.org/The_Loop#Multiple_Loops_in_Action

    I kind of made the theme!

    You can see it here:
    http://informate-juarez.codigociudadano.org/decimos-de-juarez/
    http://informate-juarez.codigociudadano.org/dice-de-juarez/

    This two pages are "considered" like pages in DINAMIC WIDGET, but doesnt display the dinamyc widget!...

    I temporaly hide some things using CSS,...

    As far as know "wp_reset_query();" RESET THE NORMAL QUERY if i make a new instance of WP_Query, shoul i still use wp_reset_query();?
    Thanks for any help you could bring me!

  5. Qurl
    Member
    Plugin Author

    Posted 3 years ago #

    Ah yes, that's because of the use of wp_query multiple times. Dynamic Widgets has no clue anymore where it is as it reads values from wp_query to determine where it is and which page is being requested.

    As suggested by alchymyth, a wp_reset_query() after the loop should fix that.

  6. Diogo15
    Member
    Posted 3 years ago #

    I try both functions, and i get the same result(a good one), so thanks for the support.

    wp_reset_postdata()
    wp_reset_query()

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic