WordPress.org

Ready to get started?Download WordPress

Forums

ELI's SHORTCURL Shortcodes to Fetch and Parse External Content
[resolved] Wrap shortcode in a div (3 posts)

  1. dmm4biz
    Member
    Posted 8 months ago #

    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="http://johnnyjensens.com/menu3" start='
    <div class="entry-content clearfix"]

    as seen here live:

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

    http://www.tivolibarandgrill.com/menu22

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

    ..

  2. Eli
    Member
    Plugin Author

    Posted 8 months ago #

    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

  3. dmm4biz
    Member
    Posted 8 months ago #

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

    Mahalo, Matty

Reply

You must log in to post.

About this Plugin

About this Topic

Tags