0

I have a sidebar with 10+ text widgets serving advertisements. Now I want to filter a particular text widget in a single post if that post has a data in meta field. I searched a lot and found Is There A Hook To Process The Content Of The Text Widget?. But this changes the content of all text widgets. How can I change a particular text widget?

0

Is it default text widget? If yes, then I don't think there is a way.

Why don't you create a custom text widget? And before echoing output process the text whatever you wants to do?

The logic is, you will create another widget, that will take some text (or html?) and you will process that text, add some data what you want and show as output :)

| improve this answer | |
  • Great! Your Solution works form me. This is what I need. – Tapan Kumer Das Mar 25 '15 at 10:40

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.