Adding PHP to single comments
Hello,
First, thanks for the new theme. I'm excited to give it a whirl. The one problem I have is that I have a bit of PHP work I need to do for each comment, like so: Use PHP to set variables Print top of comment Print variable set by PHP Print body of comment Print variable set by PHP Print bottom of comment I know I can't use PHP directly in the Montezuma options box, but I can't for the life of me figure out where to put it to achieve this. |
You will have to add a dynamic sidebar ( should be called a dynamic widget area) where you want to put in the php. Then use a php plugin like exec-php and add your php to a text widget you put in the new widget area you created.
|
I'm not quite sure I follow. There isn't any way to create a php file on the server that will just make the comments display the way I want? This seems like a lot of steps (and exec-php is 4.5 years old, so I suspect it isn't perfectly compatible with newer WP installs).
|
Quote:
Quote:
|
Thanks.
I can feel myself being dense, but I just can't seem to figure out where anything lives. For example, say I wanted to add another option to the comment quicktag buttons (which are pretty, and a good start). I can't figure out where the file is that allows me to expand on the list provided. Similarly, if I did want to make a non-virtual subtemplate for individual comment displays, I have no idea where that code goes. I'm going to try to work my head around your solution, and I really like a lot of the features and design in this theme. I'm just having trouble digesting it, I guess. |
So I solved my initial problem by adding functions to the whitelist and then defining them outside the theme. Seems to be the cleanest way since it preserves the web-editable virtual subtemplate.
Next up is the quicktags question. |
All times are GMT -6. The time now is 10:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.