• Resolved nbi1

    (@nbi1)


    Is there a way to format a post’s text so that you don’t just get the post content as it was originally created? Can post images and text be separated somehow so that they can be processed as separate components? Is there a way at post creation time to separate image and text content in anticipation of needing to treat them separately when they are rendered? I use Elementor and have had repeated problems with widgets not providing controls or custom CSS just not being applied to the text in a widget. Just rendering posts as is often isn’t helpful with the look and feel of a site.

    Also what is that blue dot that appears next to the lower left corner of a post’s image and how do I get rid of it? It’s definitely an artifact produced by display-posts. My short-code looks like this:

    [display-posts include_title=”false”
    include_content=”true”
    id=”current”]

    • This topic was modified 6 years, 3 months ago by nbi1.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    If you set a featured image when creating your post, you can include that in the Display Posts output and style it however you want. Ex:

    [display-posts include_title=”false” include_image=”true” include_content=”true” id=”current”]

    By default Display Posts outputs the results as a bulleted list, which is the source of the blue dot you see. You can change the wrapper to a div like this:

    [display-posts include_title=”false” include_image=”true” include_content=”true” id=”current” wrapper=”div”]

    Thread Starter nbi1

    (@nbi1)

    WPematico supposedly can find images in source articles and set them to be the featured image, but that isn’t working. I just found one of your tutorials on featured image which seems to contain code for extracting the first found article image as the featured. I’ll give that a try.

    Regarding the display of the image I may have misunderstood something in the docs. I took image_size=”thumbnail” to mean scale & display the featured image. It seemed to me that the presence of “image_size” would make include_image=”true” unnecessary since one wouldn’t use “image_size” unless the intent was to display the image. But based on your comment both are necessary if one wants to display a thumbnail?

    Plugin Author Bill Erickson

    (@billerickson)

    I’m sorry, you’re right, the parameter is image_size, not include_image. It’s been a while since I’ve used that parameter and it doesn’t match the naming conventions of the other display parameters.

    You should use [display-posts image_size=”thumbnail”] if you want to display the thumbnail sized image. You can use [display-posts image_size=”medium”] to display the medium size. The image sizes can be managed in Settings > Media.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘formatting post text’ is closed to new replies.