Support

Home Forums Event Espresso Premium Display value of event meta box as a friendly name -> Href link.

Display value of event meta box as a friendly name -> Href link.

Posted: August 30, 2013 at 5:04 am

Viewing 5 reply threads


Winston Douglas

    August 30, 2013 at 5:04 am

    I have two requests.

    I have included an event meta box in all of my events which contains a URL.

    1. I would like to to display this URL named “View Options” on my page inside a table which is using the espresso_table shortcode.

    2. I would like to display the same link on every event page. I think it’s registration.php

    I think it’s a combination of the following: But I can’t get the right syntax.

    <?php echo do_shortcode(‘[EE_META type=”event_meta” name=”enroll_min” event_id=”‘.$event->id.'”]’);?>

    <?php echo “View Options“; ?>

    Can you help?


    Dean

    • Support Staff

    August 30, 2013 at 5:27 am

    Hi,

    Like this

    <a href="<?php echo do_shortcode('[EE_META type="event_meta" name="View Options"]'); ?>">View Options</a>

    IT will most likely go in the registration_page_display.php file. Please copy that and the registration_page.php (you wont edit it but its needed) to wp-content/uploads/espresso/templates, and edit them in that location.

    Documentation – http://staging.eventespresso.com/wiki/shortcodes-template-variables/#ee-meta

    • This reply was modified 11 years, 1 month ago by Dean. Reason: forgot code syntax highlighting


    Winston Douglas

      August 30, 2013 at 5:45 am

      Thank you, worked perfectly for question 2. Is it the same answer for question 1?

      Thx


      Dean

      • Support Staff

      August 30, 2013 at 5:52 am

      Sorry, yes the questions are really one. The code should be added into the registration_page_display.php and that will show up for every event.


      Winston Douglas

        August 30, 2013 at 12:13 pm

        I added the same line to my espresso_table.php as I wanted the register link to click through to the url stored in the event mets box value. It didn’t seem to work though. It just reloads the same page i’m on. Any ideas?


        Winston Douglas

          August 30, 2013 at 12:39 pm

          It’s ok.. I got it working!

          Viewing 5 reply threads

          The support post ‘Display value of event meta box as a friendly name -> Href link.’ is closed to new replies.

          Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

          Event Espresso - Staging Server