Why the add_action() function not work in member function in wordpress?
Answer / Dharm Raj Singh
The `add_action()` function does not work within a class's method (member function) directly. Instead, you should register your action or filter outside of the method and then call the method inside the callback function.
| Is This Answer Correct ? | 0 Yes | 0 No |
How do I setup a wordpress database?
Can wordpress be used offline?
In what case we cannot recommend WordPress to our client?
Tell me what if I need help after the project?
How do I make my wordpress site invisible?
What is the difference between a permalink and a hyperlink?
What is the difference between posts vs. Pageshow to store the post title in variable?
Is it easy to use wordpress?
Does wordpress have a database?
Will changing wordpress theme affect content?
In which cases you don’t see plugin menu?
What are the differences between Posts and Pages?