[Resolved] Elements + Shortcode Within Div Not Playing Nicely

Home Forums Support [Resolved] Elements + Shortcode Within Div Not Playing Nicely

Home Forums Support Elements + Shortcode Within Div Not Playing Nicely

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #788567
    arthur

    Hi, this is really boggling my mind πŸ™‚

    Okay. I have set up code in my functions.php file to create a new sidebar aka widget area.

    I earlier set up a Hook via Elements to insert a graphical area using a div, image and CSS.

    Now I want my sidebar/widget area to display within that graphical area.

    But when I save the shortcode WITHIN the div, for some reason, it outputs the code on the front end OUTSIDE of the div.

    So no CSS in the world will allow me to fix that issue πŸ™

    Any thoughts? I’m loading some screenshots into Dropbox of what I have, and I have sent admin access via the account issue form.

    Expires in 2 days: https://www.dropbox.com/sh/5l51j49xwrpp2gj/AAAAv3pVlp1PDZidjhiBkgrIa?dl=0

    #788835
    David
    Staff
    Customer Support

    Hi there,

    you can’t use a short code to hook in the sidebar. You would need to call your sidebar or widget from within the shortcode. Couple of articles on doing either here:

    https://casabona.org/2014/03/include-sidebar-shortcode-wordpress/

    https://digwp.com/2010/04/call-widget-with-shortcode/

    #788854
    arthur

    I AM calling my sidebar from within the shortcode. That is literally what I am using the shortcode for – is to call the sidebar. I have it set that I can’t use PHP in Elements (would love a workaround that would leave my security plugin intact btw). So I am doing it via a shortcode.

    This is not enough information and the code from those articles doesn’t seem to work. Can you please supply more information?

    #788876
    arthur

    Got it working. Took a long time because those articles are not clear and are meant for when the sidebar has a template file. There were other issues there as well but it is resolved now. Thank you. More details next time would be appreciated πŸ™‚

    #788886
    David
    Staff
    Customer Support

    Glad to hear you got it working.

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