• Resolved benmcd0nald

    (@benmcd0nald)


    Hey,

    I’m trying to work out how to use the information in a ‘website’ custom field to link to a site with html. Something like…..

    • [pods field=”pod_meta_critic_link”]Read Reviews[/pods]
    • With the field set as ‘output as URL’ the link aspect of it works just fine but I need it to display ‘Read Reviews’ and I cant seem to manage to get it to do that. I.E. I want to just use that value in the custom field to be the link URL (if that makes sense)

      A bit lost, could someone point me in the right direction?

      Thanks
      Ben

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Jim True

    (@jimtrue)

    My apologies for just now replying to this question, but it looks like whatever you typed up above in your question got ‘eaten’ by the forum software.

    Your question sounds like one that was brought to our Slack Chat, but basically, if you want to customize how the output is handled (ie the link says ‘Read Reviews’), you’ll probably need to do that with a Pods Template and just call that instead with your shortcode, ie:

    <a href="{@pod_meta_critic_link,esc_url}">Read Reviews</a>

    Save the above as a Pods Template ‘Meta Critic Link’

    And then in your site instead of calling [pods field="pod_meta_critic_link"], call it with [pods template="Meta Critic Link"]; as long as you’re in the current post, it should call that template above which will call your custom field.

    Thread Starter benmcd0nald

    (@benmcd0nald)

    Hey Jim,

    Thanks for the reply but I still cant get this working. I’ve set up the template as you’ve described above but seem to have the following issues:

    I’m using the below in the template:

    Read Reviews

    but firstly it seems to try and add the link to my own website URL instead as an external URL i.e. http://www.domainname.com/podinfohere

    secondly it’s not actually using the value in the pod and instead shows http://www.domainname.com/%7Bproduct_meta_critic_link%7D

    thirdly as shown above it’s displaying ‘product_meta_critic_link’ instead of ‘pod_meta_critic_link’ which is the name of the pod

    I’m wondering if this might be something to do with me setting up the pod itself incorrectly. Any further thoughts of guidance will be appreciated

    Thanks
    Ben

    Plugin Contributor Jim True

    (@jimtrue)

    I’m going to suggest you coming over to our Slack Chat during our office hours (I’m around most of the days on Monday and Friday and in the mornings during the week). It’s easier to help if we can do a back and forth conversation and it looks like the forum software is eating most of your replies.

    https://pods.io/chat/

    Thread Starter benmcd0nald

    (@benmcd0nald)

    No, problem. I’ll try to drop by on Monday

    Thanks
    Ben

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Adding a shortcode link via pods’ is closed to new replies.