Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

unity100 on "Replacing/Overriding comments_template() from plugin"

$
0
0

Hi people,

i researched quite a bit but couldnt find an answer for this :

I want to replace the comment template of the theme (comments.php or whichever it is using) totally with my own function or comments.php in plugin.

In short, i want to totally override the theme's entire commenting template.

I was able to find this recommendation in stack exchange for this :

add_filter( "comments_template", "my_custom_function",0 );

However, this just filters the function, and my function just runs before comments_template, leading comments_template to STILL run after itself and load up the commenting template from the theme.

What should i use to accomplish this ?


Viewing all articles
Browse latest Browse all 8245

Trending Articles