• Resolved dmm4biz

    (@dmm4biz)


    I am just trying to show menu content from a restaurant site that is physically in our bar. I have everything looking OK, but i would like to wrap your shortcode in a div so I can add other divs and content to the page.

    A good working one can see here, just using the shortcode:

    [remote_get url="https://johnnyjensens.com/menu3" start='
    <div class="entry-content clearfix"]

    as seen here live:

    Problem with adding a <div> can be seen here:

    https://www.tivolibarandgrill.com/menu22

    <div id="jj-menu">[remote_get url="https://johnnyjensens.com/menu3" start='<div class="entry-content clearfix"' stop='<div id="comments"']</div>

    ..

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Eli

    (@scheeeli)

    WordPress is re-formatting your content data inside the shortcode and thus breaking the shortcode parameters. Where it sees “<div” it replaced with “\n<div” (CR + “<div”). So you need to fool the WP filter by using “&lt;div” in your start and stop parameters.

    Let me know if you can’t get that to work.

    Aloha, Eli

    Thread Starter dmm4biz

    (@dmm4biz)

    That did the trick!! Thanks for the quick response!

    Mahalo, Matty

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wrap shortcode in a div’ is closed to new replies.