Support » Plugin: Thumbs Rating » SHORTCODE PHP

  • Hi Thumbs,

    The shortcode works fine put in the regular edit pages. But it wouldn’t work for php? I even used single/double quote, NO LUCK??

    <?php echo do_shortcode(‘[thumbs-rating-buttons]’);?>
    <?php echo do_shortcode(“[thumbs-rating-buttons]”);?>

    Please help, Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Ricard Torres

    (@quicoto)

    Hello,

    Where have you used this php code?

    Thanks

    Thread Starter DamnDramaQueen

    (@damndramaqueen)

    Hi Ricard,

    Normally it will show any shortcode feature in general…

    Anyhow, I tried to put in the page.php and other php pages where I want the vote to show.

    Please advise, Thanks

    • This reply was modified 1 year, 7 months ago by DamnDramaQueen. Reason: add words
    Plugin Author Ricard Torres

    (@quicoto)

    That is very strange, it should work out of the box. It is a regular shortcode. If the shortcode works in a page, why not in the PHP?

    I can’t really tell from here why it isn’t working.

    There must be something else that is breaking it.

    Thread Starter DamnDramaQueen

    (@damndramaqueen)

    Hi Ricard,

    Ok, I got it working now…

    It was a BAD single quote when pasted in <?php echo do_shortcode(‘ ’);?> , so I have to keyed it in to replace it (‘ ‘)

    ———-
    The only thing is, the phase is already showing ( You Already Voted! ) ? I haven’t even vote yet, see below, any idea why?

    [Vote Up +0] [Vote Down -0]
    You Already Voted!

    Please advise, Thanks

    Plugin Author Ricard Torres

    (@quicoto)

    The only way it will throw that message if you actually have voted in that URL before. The code checks the browser local storage to find the post you’re looking at to mark is as voted or not.

    You’re having a lot of weird issues we’ve never encountered before. Not sure why it shows 0 votes.

    Thread Starter DamnDramaQueen

    (@damndramaqueen)

    Hi Ricard,

    Ok, I just used css to hide the phase! Altho is not the right way to fix the issue, but it did the trick for now.

    Thanks for your big helped!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘SHORTCODE PHP’ is closed to new replies.