Word press php code question!

Discussion in 'PHP' started by bbrian017, Nov 30, 2007.

  1. #1
    I'm trying to add a vote now button for all my blogengage users but whats happening is it's being displayed in the home page of their blogs. When they select the vote now on the home page it submits their home page information.

    So I only want the image to show up on the Blog article Page. I was wondering how could I make this happen.

    Here's a demo of what's currently happening and like I said I don't want it to display on the home page just the new blog aerticle page and right under the Title is possible.

    Demo: http://www.blogengage.com/blogger/?p=13

    don't want it like this demo: http://www.blogengage.com/blogger/


    Thanks in advance!
     
    bbrian017, Nov 30, 2007 IP
  2. mikebrad0927

    mikebrad0927 Peon

    Messages:
    266
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yeah, if you are using the Kubrick theme, you need to make a new .php file just for single posts. The reason that this is happening is because kubrick uses index.php for both homepage and single posts.
     
    mikebrad0927, Nov 30, 2007 IP
    bbrian017 likes this.
  3. bbrian017

    bbrian017 Well-Known Member

    Messages:
    2,990
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    170
    #3
    Think it's possible that you could perhaps walk me through this process of making a new.php page and how to implement it. If so I can offer you something in return such as a blog roll link :)

    Thanks,

    bbrian017
     
    bbrian017, Nov 30, 2007 IP
  4. mikebrad0927

    mikebrad0927 Peon

    Messages:
    266
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    actually, I just looked at it and I was wrong. There is already a single.php file, you just need to change the way you add code.

    I'm assuming you added this plugin as a widget, is that correct?
     
    mikebrad0927, Nov 30, 2007 IP
  5. bbrian017

    bbrian017 Well-Known Member

    Messages:
    2,990
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    170
    #5
    No it's a java script code I added to each blog post. See I own blogengage and I want my members to have the ability to add this code on all the blogs they submit to blogengage. So their readers can vote for them and get them to the front page.

    But I don't want it showing up on the index page only blog posts right now it shows up on the index page

    The code I want to add is this,

    <script src="http://blogengage.com/evb/check_url.js.php" type="text/javascript"></script>
     
    bbrian017, Nov 30, 2007 IP
  6. mikebrad0927

    mikebrad0927 Peon

    Messages:
    266
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Instead of adding it to each blog post, go to presentation >> theme editor >> single post

    place this code:

    <p><script src="http://blogengage.com/evb/check_url.js.php" type="text/javascript"></script></p>
    Code (markup):
    after:

    <h2><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    Code (markup):
    and that should make it appear on single pages only.
     
    mikebrad0927, Nov 30, 2007 IP
  7. bbrian017

    bbrian017 Well-Known Member

    Messages:
    2,990
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    170
    #7
    Worked perfect, now as I said for help me you can have a link on a blog roll right? Well I have three you can choose form.

    seomkt.com
    iknownil.com
    or
    blogengage.com/blogger/

    go ahead and pick one also post your url here in this thread I will add it ASAp (right now)

    thanks again!
     
    bbrian017, Nov 30, 2007 IP
  8. mikebrad0927

    mikebrad0927 Peon

    Messages:
    266
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Glad it worked out for you. Any of those sites are fine.

    http://www.gearadrift.com
    Navy Humor

    pm me anytime you need some wordpress help!

    Thanks.
     
    mikebrad0927, Nov 30, 2007 IP
  9. bbrian017

    bbrian017 Well-Known Member

    Messages:
    2,990
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    170
    #9
    bbrian017, Nov 30, 2007 IP
  10. mikebrad0927

    mikebrad0927 Peon

    Messages:
    266
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #10
    yeah, width: 640px; needs to be lowered. Edit the post in code mode and change it to a smaller number.
     
    mikebrad0927, Nov 30, 2007 IP
  11. bbrian017

    bbrian017 Well-Known Member

    Messages:
    2,990
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    170
    #11
    oh your good :)

    Cheers,
     
    bbrian017, Nov 30, 2007 IP
  12. mikebrad0927

    mikebrad0927 Peon

    Messages:
    266
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #12
    increase the height a bit, too and it will get rid of the scroll bar.
     
    mikebrad0927, Nov 30, 2007 IP
  13. mikebrad0927

    mikebrad0927 Peon

    Messages:
    266
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #13
    yeah, go bigger, though. It doesn't look right. Try 400px wide and 100px high. Play with is until it fills out properly.
     
    mikebrad0927, Nov 30, 2007 IP
  14. bbrian017

    bbrian017 Well-Known Member

    Messages:
    2,990
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    170
    #14
    Thanks a changed what you said too :)

    Looks ok I think
     
    bbrian017, Nov 30, 2007 IP