• I am using the vote it up plugin on my blog, and I want to place 4 vote boxes on ONE page, but have them each vote for something different. I cant do it because when I put more than one in, they all retrieve the same post_id. So when I click vote on one option, they all get clicked.

    the code is;

    <?php DisplayVotes(get_the_ID()); ?>

    Is there some way to manually attach a post ID number other than the page its on. Like for example ID 65, and then also id 1001. I dont know a lot about code, but I would imagine something like thid;

    <?php DisplayVotes(get_the_ID( id=65)); ?>

    <?php DisplayVotes(get_the_ID( id=1001)); ?>

    that way instead of “getting” the id, it just takes the one I define. There a way to do this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • All get_the_ID() does is spit out the post ID number– nothing more complicated. If you know what the IDs are all you should have to do is DisplayVotes('65'); DisplayVotes('1001'); and so on.

    Thread Starter naturalsuccess85

    (@naturalsuccess85)

    I tried that, and it worked (loaded without a code and line error), but all the voting buttons say “voted!”. Meaning if I press one it still presses them all. Is there some kind of additional code I can add onto this to make each line of PHP seperate?

    I am putting these on a page, using EXEC PHP.

    You need to find where DisplayVotes() is defined and figure out exactly what its doing. Your problem is not with passing the post ID number. That bit is easy. I’ve never used EXEC PHP (played with it a bit once, but not much) so I’m not sure if that part is relevant.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘DEFINE the_ID number?’ is closed to new replies.