• Hello

    I would like to add a “more info” button to my feature shows on the front page of the website but i don’t seem to be able to achieve this with the {{}} shortcodes.

    The button would link through to the production page as per the permalink on the image and title.

    can you help or point me in the right direction.

    Many Thanks

    Steve

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeroen Schmit

    (@slimndap)

    Hi Steve!

    You can add the following code to the functions.php of your (child) theme:

    function get_more_info_html( $html, $field, $event) {
    
    	$production = $event->production();
    
    	ob_start();
    	?><a href="<?php echo $production->permalink(); ?>">More info</a><?php
    	return ob_get_clean();
    }
    
    add_filter( 'wpt_event_more_info_html','get_more_info_html', 10, 3 );

    Now you can use a {{more_info}} placeholder inside the [wpt_events] shortcode.

    Thread Starter Steve Shepherd

    (@sheppy1974)

    Hi Jeroen

    Thanks for this, works a treat!

    Steve

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding a more info button’ is closed to new replies.