functions - Remove <figure> tag on my RSS Feed

I need to remove thetag that appears on my feed content ($content variable). Is there an existing function to this ta

I need to remove the tag that appears on my feed content ($content variable).

/

Is there an existing function to this task?

Some tags appear with width instructions that are differents on each appear. How can I remove them completely?

I need to remove the tag that appears on my feed content ($content variable).

http://mkt-d.hospedagemdesites.ws/wp/feed/

Is there an existing function to this task?

Some tags appear with width instructions that are differents on each appear. How can I remove them completely?

Share Improve this question edited Jun 6, 2019 at 18:41 vts asked Jun 6, 2019 at 17:58 vtsvts 134 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 3

I believe the most direct way of customizing WordPress feeds is to hook into them directly with the following filter. Edit: as we talked about, let's just edit the content to tear out any

function edit_your_feed_content($content) {
    $content = preg_replace("/(<figure.*?[^>]*>)(.*?)(<\/figure>)/i", "", $content);
    return $content;
}
add_filter('the_content', 'edit_your_feed_content');

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745426607a4627207.html

相关推荐

  • functions - Remove &lt;figure&gt; tag on my RSS Feed

    I need to remove thetag that appears on my feed content ($content variable). Is there an existing function to this ta

    4小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信