WordPress Business Themes › Forums › Version 7 Themes › DirectoryPress › 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?
You need to create the custom fields first so they can add the links when they create the listing.
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!
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.
I too would like to know how to do this.
use the WordPress get_post_meta function;
Submit your feature requests to our ideas board and it could be included in a future theme update.
or contact our support team