This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Theme shortcode embed breaking site

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Theme shortcode embed breaking site

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2381
    mistercyrilmistercyril
    Participant

    Hello,

    I’ve installed the plugin and am using suggested theme shortcode integration to display search in my header.


    <?php echo do_shortcode('[wpdreams_ajaxsearchpro id=1]'); ?>

    The problem I am having is that it is breaking my <div> structure and the resulting layout.

    Here is the HTML in the header.php template :


    <div id="search" class="col-md-6 col-sm-6">
    <div class="pull-right">
    <?php echo do_shortcode('[wpdreams_ajaxsearchpro id=1]'); ?>
    </div>
    </div>

    But when the page is rendered, it pulls in the following <div></div> into the #search div.

    I’m guessing there might be a missing closing </div> tag in the code rendered by your plugin, but its just a thought.

    Any help would be great,

    Kind regards,

    Cyril

    #2387
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Does this happen if you put the search to a different position?

    Do you have a working example page of this maybe? I would like to check the problem closely as I could not find missing closing tags in the code. Or you can copy/paste the whole header.php code to http://pastebin.com/ and maybe I can discover something.

    #2391
    mistercyrilmistercyril
    Participant

    Ok so i fiddled around with it and I think it might have been the cache playing games with me.

    I added an extra </div> after the shortcode and it was still broken but moved the issue further down the DOM. Then when I removed it, everything was perfect…

    Sorry for this one 😉

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.