• nordie

    (@svenn36)


    I have a question/problem regarding the output of
    post_content

    we are using bricks builder and also to modify the single template layout of wpsl
    everything works fine except posting the post its text
    When we use {post_content} it results in placing everything twice as we aus the shortcodes to display to display specific parts
    eg
    // Add the address shortcode
    echo do_shortcode( ‘[wpsl_address name=”false” address=”false” city=”false” zip=”false” country=”false”]’ );?>

    When we use {post_excerpt} to display the text I get to see the unformatted text (just one paragraph)
    What we would like to see is just the (formatted) text
    is
    Is it possible to get this done?

Viewing 11 replies - 1 through 11 (of 11 total)
  • farroyo

    (@farroyob)

    Hi there, thanks for reaching out!

    Wordpress generally removes HTML markup from excerpts by default, so you will probably need to do some hacks in your functions.php file. This issue is actually not related to Wp Store Locator, it is a general WordPress feature, but digging a little bit online you can find some suggestions like this one.

    I hope that helps.
    Best regards,

    Thread Starter nordie

    (@svenn36)

    thanks for the reply
    there is no other way to display just the post its text? no way to output that field?

    Hi again,

    I’m afraid this is something WordPress does by default, to sanitize the excerpt HTML and strip all of its HTML tags. Bear in mind that the excerpt can be shown in multiple places across the site, and most of the time the wisest thing is to remove HTML tags and stick to the text, so that the theme can decide the appearance of the excerpt based on the context. As I said, this is standard from WordPress and it is actually not related to Wp Store Locator, sorry about that.

    Regards,

    Thread Starter nordie

    (@svenn36)

    this is not specifically about the post excerpt
    i want to show the post text content like a regular post ergo is it possible to display just the text either by shortcode or dynamic data?

    see link

    https://imgur.com/a/ySkcPCu

    Hi again,

    Oh, I see. Well, showing the post contents in the search results is easy to do. Please check this article from our documentation: Include post content in the search results.

    Would that work for you? Is that where you want to have the post contents shown?

    Thread Starter nordie

    (@svenn36)

    sorry I never mentioned search
    What we want is that, as visible on the attached image, the text / description of the post is displayed and not like {post_content} which displays everything
    This it is about the template of the single wpsl stores

    Hi again,

    Um, I think you forgot to attach the image, could you please double check so I can get a better idea of what you are trying to achieve? Many thanks.

    Thread Starter nordie

    (@svenn36)

    i already did supply the image ??
    https://imgur.com/a/ySkcPCu

    Hi again,

    I apologize but I’m having a hard time understanding what you want to achieve. You have some content in the store locations that you have created, and that content is shown in the frontend via “the_content()” in the individual store template. Is that the place where you want to have it visible?

    Thread Starter nordie

    (@svenn36)

    Never mind i added an acf field for the textual content

    Ok, that is good to know. I’m glad you sorted that out.

    Kind regards

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