I am adding filter to add embed before post content, but don't want add to other places where called apply_filters("the_content").

So i need add embed before(after) post content without "the_content" filter hook.

add_filter('the_content', 'embed_on_post');
  • Can you please give some more idea on this. Are you using custom theme? – Pratik bhatt Jul 20 '17 at 6:35
  • No, I am writing plugin, and my problem is add embed before(after) post content, and not use the_content filter, you have alternative way please help – Tigran Babajanyan Jul 20 '17 at 6:46
  • Ok so you mean to add the content of function before post content right? Probably Not possible – Pratik bhatt Jul 20 '17 at 6:58
  • 1
    Why can't you use the the_content filter? There are ways to limit which uses of the filter the function is applied to. You'd just need to tell us which places you do or don't want to apply the filter. – Jacob Peattie Jul 20 '17 at 9:58
  • I want filter only post(custom post) content, but not any other content filtered by 'the_content'. – Tigran Babajanyan Jul 20 '17 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.