Pulling a variable into a link

Home Forums Calendar Products Events Calendar PRO Pulling a variable into a link

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #16492
    Jonah
    Participant

    Hi Darren, make sure if you’re using tribe_get_custom_field(‘Label’, $post->ID) that you are echoing because it doesn’t return anything by default – you need to use echo tribe_get_custom_field(‘Label’, $post->ID)

    Also, does the event you’re looking at have something input for the custom field?

    And, make sure you replace “Label” with the label of your custom field. Do you have an example of the code you’re working with you can post to http://pastie.org/pastes/new

    #16500
    Darren
    Participant

    It all looks correct. I’ve added 3 versions of the code, the two earlier ones you suggested and the one that worked previously but now breaks the link it does however pull the actual variable I want but along with some markup.

    Heres the code http://pastie.org/3554548

    And the page you can see it working on http://www.highamhall.com/course/after-matisse-and-cezanne-pastel-into-still-life/ At the top of event entry you can see the ‘Ref A1649’- its that I want to pass through the link.

    #16542
    Jonah
    Participant

    Hi Darren, you definitely want to use the first function ( echo tribe_get_custom_field(‘Ref’, $post->ID) ) in the examples you provided. Make sure the single quotes around the label are proper in the code. I needed to change them on my end after copying your code (sometimes these can get messed up copying plain text code from websites). It works fine for me.

    #16572
    Darren
    Participant

    Hi Jonah

    It was the quote marks – I never thought to look if they were different. Simple when you know how 🙂

    Thanks for your help

    #16610
    Rob
    Member

    Glad to hear you got this all squared away, Darren. Let us know what else we can do and thanks for your use of this plugin.

    #975947
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 6 posts - 16 through 21 (of 21 total)
  • The topic ‘Pulling a variable into a link’ is closed to new replies.