Ready to get started?Download WordPress


Savvii Custom Post Widget
[resolved] Need feature to remove div in shortcode (4 posts)

  1. dimagsv
    Posted 12 months ago #

    I need a feature to remove div when content displayed using shortcode. I need to insert inline text. For ex.:
    Contact info: [content_block id=1234]
    [content_block id=1234] must be an inline element in my case.
    Can I make this with your plugin?


  2. Johan van der Wijk
    Plugin Author

    Posted 11 months ago #

    Hi dimagsv,

    Yes, you should be able to display the content block inline using css.

  3. dimagsv
    Posted 8 months ago #

    This can't be made using css. div is not allowed in p element by html specification.
    Contact info: [content_block id=1234]
    will be in html:
    <p>Contact info: <div><p>bla bla bla</p></div></p>
    , but browser will interpret this as
    <p>Contact info: </p><div><p>bla bla bla</p></div><p></p>
    Browser will auto close first p tag.

  4. Johan van der Wijk
    Plugin Author

    Posted 6 months ago #

    Unfortunately this cannot be done with the Custom Post Widget plugin. In line 184 of the file post-widget.php you can see that a div is always added around the embedded content block. You could of course remove lines 184 and 186 of the plugin, but when updating the plugin this will be undone.


You must log in to post.

About this Plugin

About this Topic


No tags yet.