Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

How to add custom PHP to each comment?


  #1  
Old Mar 10, 2014, 10:38 PM
mmlac
 
2 posts · Jun 2013
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
  #2  
Old Mar 11, 2014, 03:19 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Mar 11, 2014, 11:35 AM
mmlac
 
2 posts · Jun 2013
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)
  #4  
Old Mar 11, 2014, 01:50 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] send comment notification to custom field value (email) egjweb Atahualpa 3 Wordpress theme 3 Feb 15, 2012 06:12 PM
[SOLVED] Website in comment form leads to author name as a link in the comment list --yeah--wow Comments, trackbacks & pings 2 Jun 2, 2011 09:34 PM
add custom comment fields Seidlm Comments, trackbacks & pings 1 Aug 23, 2010 06:23 AM
How to add "Custom Smilies" to Comment replies/posts in Atahualpa punzhu Comments, trackbacks & pings 1 Mar 3, 2010 02:38 PM
Add Custom Comment Fields to Posts rebmarmad Post-Kicker, -Byline & -Footer 1 Dec 21, 2009 05:36 PM


All times are GMT -6. The time now is 12:35 AM.


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