Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

How to add a button to Listing Page

  • Sharwan
    Sharwan
    Newbie 7 points
    July 18, 2013 at 1:57 pm

    I would like to add an additional button to the listings page for Facebook and Twitter links… Right next to “Visit Website”, “Contact Owner” and “Share”. I’m not a great programmer, so I tried copying the code for the “Visit Website” link, changing $link to $facebook (my url custom field). This didn’t work. Any ideas on how I could do this?

  • Ian
    Ian
    Super Guru 1,200 points
    July 18, 2013 at 2:23 pm

    You need to create the custom fields first so they can add the links when they create the listing.

  • Sharwan
    Sharwan
    Newbie 7 points
    July 18, 2013 at 2:26 pm

    So far I have…

    <a href="<?php $facebook ?>"><img src="../images/facebook.png"></a>

    I’m just not sure how to call out my custom field. I thought $facebook or echo $facebook would work but no such luck. I’m terrible with php so apologies if this is extremely obvious to everyone else!

  • Sharwan
    Sharwan
    Newbie 7 points
    July 18, 2013 at 2:27 pm

    Hi Ian,

    I have created the custom fields. They’re named facebook and twitter. Am I calling it right in the link? I’m not quite sure what Im doing lol.

    Thanks!!

  • Denise
    Denise
    Newbie 41 points
    July 25, 2013 at 10:56 pm

    I too would like to know how to do this.

  • Mark Fail
    Mark Fail
    Super Guru 12,822 points
    July 26, 2013 at 1:32 am

    use the WordPress get_post_meta function;

    http://codex.wordpress.org/Function_Reference/get_post_meta

Viewing 6 posts - 1 through 6 (of 6 total)