• Resolved vesnama

    (@vesnama)


    hi,

    When I use post_content in Pods template to show the post content from related post, everything is displayed OK except that YouTube links are not embedded showing the thumb, but only raw links.

    I use this: {@for_work.post_content}

    can this be solved?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Paul Clark

    (@pdclark)

    the_content filters need to be run on the related content for oEmbed to occur.

    Add this function as a Code Snippet, plugin, or in theme functions.php:

    function content_filters( $content ) {
    return apply_filters( 'the_content', $content );
    }

    …then add content_filters to Display callbacks allowed on Pods Admin > Settings — e.g., esc_attr,esc_html,content_filters

    Then change the magic tag to {@for_work.post_content,content_filters}

    Thread Starter vesnama

    (@vesnama)

    thank you. I did all 3 steps you provided. Now no content being displayed.

    Plugin Support Paul Clark

    (@pdclark)

    Make sure Pods Admin > Settings > Display callbacks allowed contains literally content_filters or esc_attr,esc_html,content_filters separated by commas (not content_filter without an s — it has to match the name of the function in function content_filters( $content )

    In testing here, it works regardless of any other settings or restrictions, as long as the function name is entered correctly and the relationship is to a single post.

    Thread Starter vesnama

    (@vesnama)

    the s is there correctly: esc_attr,esc_html,content_filters

    checked it has only one related post, which was displayed so it would have to work, but just YouTube was not showing as thumbnails.
    any other ideas how to solve this?

    Plugin Support Paul Clark

    (@pdclark)

    Does the oEmbed display on the related post if viewed on its own?

    If not:

    • Is the YouTube URL on its own line in a Paragraph block or TinyMCE?
    • Does it work if the link is added with the [embed] shortcode in a paragraph or shortcode block e.g., [embed]https://www.youtube.com/watch?v=e26zZ83Oh6Y[/embed] ?
    • Does disabling other plugins or switching to a default theme resolve it?
    • Are any oEmbed customizations running?

    Each of these methods works in testing with a default WordPress + Pods configuration with a post related to another post loading post_content from a relationship through a magic tag.

    Thread Starter vesnama

    (@vesnama)

    it works on original post. In it is in the main content block added as simplest YouTube pasted link with embed display. Embeds elsewhere work ok.

    Plugin Support Paul Clark

    (@pdclark)

    Here is a screen recording of setup starting from a default configuration: https://ibb.co/yYL3t8j

    Verify the additional function is installed and active.

    Verify there is not any conflicting functionality on the specific site compared to a default installation.

    Thread Starter vesnama

    (@vesnama)

    thank you for recording. Yes, everything is as in your video. Unfortunately, I don’t have time now to test by switching of plug-ins or switching the theme, so I will have to leave it as it is if you don’t have any other suggestions.

    UPDATE????

    this doesn’t work:

    {@for_work.post_content,content_filters}

    but for some reason this works as I wanted, although I do not understand why I need to use each, as I only have one related item for_work:

    [each for_work]{@post_content,content_filters}[/each]

    hm?

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