Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   How to add custom PHP to each comment? (http://forum.bytesforall.com/showthread.php?t=21654)

mmlac Mar 10, 2014 09:38 PM

How to add custom PHP to each comment?
 
I tried to create a subtemplate-comments-comment.php in /wp-content/themes/montezuma but the content was not picked up. Also I cannot see how the rendering is called, the comments.php seems not to render the comments, just the use-cases when there is a password protection / no comments.

I need to add a custom php function below each comment, how can I do this?

Thanks

juggledad Mar 11, 2014 02:19 AM

I would add a dynamic widget to the MTO->Sub Template->comment.php->One Comment in Comment List option and then install teh 'exec php' plugin, add a text widget to your new widget area and then put your php in it.

mmlac Mar 11, 2014 10:35 AM

Is there a way to actually replace the subcomment template with a file? I don't want to use the widgets hack and prefer the real files over the virtual template anyway. (which leads me back to wondering what file contains the call to the comment rendering itself)

juggledad Mar 11, 2014 12:50 PM

If you don't want to use the virtual templates you are losing the big feature of the theme - with the virtual templates, during the next update you don't have to make the changes again. If you change a physical template and update it, you lose your changes.


All times are GMT -6. The time now is 09:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.