• Resolved sorhaug

    (@sorhaug)


    Hi,
    I try to add a video background to my page, but have found that it will not display unless I disable the second loop at the bottom of the page. As soon as I enable the query_posts string the video disappears.
    Is there a simple explenation to this, or a trick to fix it?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter sorhaug

    (@sorhaug)

    … and there I found it! wp_reset_query(); did the trick!

    Plugin Author pushlabs

    (@pushlabs)

    Hi sorhaug,

    Thanks for your question! I’m glad you got the issue resolved.

    I’m going to elaborate a little bit on what’s going on here, just in case someone wonders across the same issue ??

    Video Background uses the custom fields for each post or page the video background is set on. As a result, video background relies on being able to use the $post ID to find the custom fields information, and to display the video background. When a new WP Query is established, the post ID changes based on the query created. When the Query is not closed using wp_reset_query(), Video Background tries to pull the custom fields data from the post ID of the WP Query, instead of the page or post.

    In short, be sure to close your queries with wp_reset_query() ??

    Blake

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Second loop’ is closed to new replies.