Results 1 to 2 of 2

Thread: urlencode for Pinterest image

  1. #1
    Member 123Malaysia's Avatar
    Join Date
    Jul 2010
    Location
    Malaysia
    Posts
    92
    Thanks
    5
    Thanked 12 Times in 10 Posts

    urlencode for Pinterest image

    Hi, im looking for how to add image url to the pinterest pin. The code needed urlencode for image. I know we can take the first image url with :

    <?php echo cp_get_image_url_raw($post->ID); ?> code. But how do we urlencode it? Anyone to help?

    Here is what needed for pinterest code :

    <a href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode(get_permalink()); ?>&media=<?php echo urlencode(wp_get_attachment_url(get_post_thumbnail _id())); ?>&description=<?php echo urlencode( get_the_title()); ?>" class="pin-it-button" count-layout="none">Pin It</a>
    <script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>

    Thanks in advance!

  2. #2
    Member 123Malaysia's Avatar
    Join Date
    Jul 2010
    Location
    Malaysia
    Posts
    92
    Thanks
    5
    Thanked 12 Times in 10 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Pinterest[dot]com
    By tbase in forum WordPress General Discussion
    Replies: 6
    Last Post: April 23rd, 2012, 09:49 AM
  2. post image using free image hosting sites option
    By vincent in forum ClassiPress General Discussion
    Replies: 3
    Last Post: October 9th, 2011, 11:59 PM
  3. [SOLVED] Image Resize Type show black shadow over the image
    By halimo in forum Report ClassiPress Bugs
    Replies: 30
    Last Post: March 12th, 2011, 10:41 PM
  4. No image posted with ad, Ad shouldnt post a default image
    By tklein in forum ClassiPress General Discussion
    Replies: 1
    Last Post: March 8th, 2011, 08:30 AM