Create a link from a custom field


I’ve now got classifieds working great. The only thing I’m stuck with now is creating a link from the contents of a custom field. I’ve added a custom text box through the Classified Content types so people can put in the URL to their ebay auction for example. But how do I then call that up so that it shows as a working link in the classified listings?

Here’s how my listings currently look.

At the bottom you can see “Auction Link”… What I need to do is turn the URL displayed into a working link now :slight_smile:

Any help would be greatly appreciated.



  • DavidM
    • DEV MAN’s Mascot

    Hi Justin,

    Good question! This one’s a bit of a technical one given the way Classifieds works.

    The custom fields are all handled from the following file:


    As mentioned in that file, you can override it in your theme by using a variant of it within your theme, but it’s really not a light task, it’s something meant for a developer essentially.

    So basically, that file iterates through all the custom fields you specify and displays them and what you probably do is create a new conditional section above all the initial ones, perhaps like the following:

    <?php if ( $custom_field['field_id'] == 'url' ): ?>

    And proceed to echo that field as a url. If this sounds complex, you’ll probably want to get a developer to assist with the task. You can take a look at the job board to help with that.



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.