How to add a button to Listing Page

WordPress Business Themes Forums Version 7 Themes DirectoryPress How to add a button to Listing Page

How to add a button to Listing Page

July 18, 2013
Sharwan Sharwan
  • Sharwan
    Sharwan
    Newbie 7 points

    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?

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

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

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

    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!

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

    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!!

    July 18, 2013 at 2:27 pm
  • Denise
    Denise
    Newbie 41 points

    I too would like to know how to do this.

    July 25, 2013 at 10:56 pm
  • Mark Fail
    Mark Fail
    Super Guru 12,812 points

    use the WordPress get_post_meta function;

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

    July 26, 2013 at 1:32 am
Viewing 6 posts - 1 through 6 (of 6 total)

Didn't find what you were after?

Chat with us now

or contact our support team