• toshi345

    (@toshi345)


    Hello,

    So I am trying to create a deals/offers site for one of my clients and what I require is that: When I create a new post, along with the text I need a custom field where I can enter a link to an external URL (URL to the deal/offer that the post is about). And how to display the data from this custom field on the output post in the form of a button. Let’s say the button will be located at the end of the post and will say “Get This Offer”.

    Hope I can find a solution here.

Viewing 7 replies - 1 through 7 (of 7 total)
  • lisa

    (@contentiskey)

    to get a custom field area to display— a small modification to theme template will be needed with a bit of CSS styling to make the display look more like a button.

    do you have the basic CSS for the button already planned out? (link color, dimension,background,border etc)

    do you have a child theme set up already for this website?

    ====
    otherwise, there are plugins that can help with custom fields if you prefer however, the ones I know of are paid plugins. let me know if you need recommendation.

    Thread Starter toshi345

    (@toshi345)

    Yeah I have all covered. Just need to figure out things on how to do them.
    And also I’ll prefer not to use any plugin for this purpose and modify the template myself.

    Any help will be appreciated.

    Thanks

    lisa

    (@contentiskey)

    for the no plugin approach here is the codex resource:
    https://codex.www.ads-software.com/Custom_Fields

    (it might take a few tries to get it to display exactly how you want but it’s worth it to take a bit of time to learn.)

    Thread Starter toshi345

    (@toshi345)

    Thank you. I’ll give it a try.

    Thread Starter toshi345

    (@toshi345)

    Some of the stuff from https://codex.www.ads-software.com/Custom_Fields makes sense.
    But if I add the target url in the custom field, how can I display it as a hyperlink and more specfically a button at the end of the post.

    Davetechie

    (@davetechie)

    u tried using your brain?

    lisa

    (@contentiskey)

    I have found that custom fields area accommodates html so you could just put in the full html for the link with the appropriate button class set up for display.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to add a custom meta field in post editor and display it on output post?’ is closed to new replies.