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

How to add a button to Listing Page

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?

Created: July 18, 2013 at 1:57 pm

  • Ian
    Ian
    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
    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
    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
    July 25, 2013 at 10:56 pm

    I too would like to know how to do this.

  • Mark Fail
    Mark Fail
    July 26, 2013 at 1:32 am

    use the WordPress get_post_meta function;

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

Copyright © 2010-2020 PremiumPress Limited.

secure payments