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)
-   -   wp-voting & montezuma (http://forum.bytesforall.com/showthread.php?t=20028)

tdhz77 Mar 29, 2013 06:05 PM

wp-voting & montezuma
 
I've had mixed results using php-exec plugins to get wp-voting to show up on the index.php and single.php to work.

I was able to get the voting to work when I edited comments.php.

The problem with php-exec is two fold. One, My site allows users to submit stories, so I don't want registered users to be able to write php into the post. Second, php exec as a widget shows up on homepages/posts and I don't want users to vote on those sites.

Is there anything else I could do to ensure that this works.

Adding <?php if(function_exists('wpv_voting_display_vote'))
wpv_voting_display_vote(get_the_ID()); ?>

to single.php or index.php does not work from admin or from an edited file through ftp.

Thanks.

juggledad Mar 29, 2013 06:40 PM

use one of the php widgets like 'php code widget' it just runs php in the widget. Then you could also use 'widget logic' to control when teh other widget shows up.

tdhz77 Mar 29, 2013 08:44 PM

Thank you for your quick response. That is certainly a solution, however if I want the voting to be position next to the title and not in a widget, why does editing index.php or single.php not work like editing comments.php? I assume because comments.php is in the root and index.php and single.php are nested in the child theme. As a matter of education and knowledge could you point me to some resource or perhaps what to google, so that the theme will run new php code from within these plugins? Thank you.

juggledad Mar 30, 2013 03:02 AM

Are you editing the physical or virtual templetes?

jerryc Mar 30, 2013 09:13 AM

Quote:

Originally Posted by tdhz77 (Post 98818)
I want the voting to be position next to the title and not in a widget

To make them side by side, use the MZ grid. If you don't put a title on the widget, and style the css so it lays out how you want, only somebody looking at your source code will know it's in a widget.

Quote:

why does editing index.php or single.php not work like editing comments.php?
I had problems with getting index.php to work, too. Juggledad suggested I make new template called front-page.php and use it instead. I don't know what the difference is, but it works perfectly. I'm only using WP as a CMS for pages, so I can't tell you anything about single.php.

tdhz77 Mar 31, 2013 12:17 AM

I much prefer to edit the file templates and not the virtual. Most importantly because for whatever reason I can't use copy paste. However, I've made edits using both, but only had luck using the virtual.

That's good advice on front-page.php. Thank you very much, for the advice. I will try this as soon as I can.

lmilesw Mar 31, 2013 12:51 PM

If you edit other than the virtual templates they will not survive a theme upgrade. This theme is build with the idea of just editing the virtual templates.

How are you trying to copy and paste? It works fine for me.


All times are GMT -6. The time now is 10:23 PM.

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