Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter ulrich.stettler

    (@ulrichstettler)

    I have found an resolution, i have add the following code to the the-events-calendar-shortcode.php:

    if( self::isValid($atts['button']) ) {
    								$output .= "<form action='".get_permalink($id)."'><input type='submit' class='button' value='read more'></form>";
    							}
    
    and add the button='true' to the ecs-list-events shortcode
    							break;

    I’m glad you submitted this question! I would like to show a “Find out more” button following the excerpts as well.

    I have tried to add the line of code you suggested and it didn’t work for me. I have 2 follow up questions:

    1) where precisely should the above code be inserted in the php file?

    2) Dreamweaver tells me that there is a syntax error on the following line, do you have a suggestion to get this line to work:

    and add the button='true' to the ecs-list-events shortcode

    Thank you in advance for your help!

    Thread Starter ulrich.stettler

    (@ulrichstettler)

    Hi nadinenb

    Sorry for my late answer.

    You have right, I have make an unclear disclosure with the code snippsel.

    The correct one are to insert the following code in the-events-calendar-shortcode.php (after case ‘venue’ section, more precisely after the break; from this section):

    case 'button' :
    	if( self::isValid($atts['button']) ) {
    		$output .= "<form action='".get_permalink($id)."'><input type='submit' class='tribe-events-read-more' value='read more'></form>";
    	}
    	break;

    and then on the page by the [ecs-list-events] shortcode add the button=’true’ (for example [ecs-list-events cat=’events’ button=’true’])

    Hope this help.
    Regards, Ulrich

    Thread Starter ulrich.stettler

    (@ulrichstettler)

    Edit: For your “Find out more” button are the correct code:

    case 'button' :
    	if( self::isValid($atts['button']) ) {
    		$output .= "<form action='".get_permalink($id)."'><input type='submit' class='tribe-events-read-more' value='Find out more></form>";
    	}
    	break;

    Ulrich, Thank you very much for your reply! You actually responded fast, since this is a free forum and I wasn’t expecting an answer before a while.

    I have implemented your code in the php file as well as updated my widget shortcode and unfortunately cannot get the button to show up on my test website:
    https://karen.nadinenbone.com/events/

    I must be doing something wrong…

    Thread Starter ulrich.stettler

    (@ulrichstettler)

    Hi nadinenb

    1. have you add the code in the-events-calendar-shortcode.php?

    case 'button' :
    	if( self::isValid($atts['button']) ) {
    		$output .= "<form action='".get_permalink($id)."'><input type='submit' class='tribe-events-read-more' value='Find out more></form>";
    	}
    	break;

    2. which shortcode you have used on the page? (As an example [ecs-list-events cat=’events’ button=’true’]) <– the strong you must add to the exist part of the shortcode

    Regards, Ulrich

    Tobias

    (@gestaltraeume)

    Hi Ulrich steiler,

    thanks for your code. it doesn′t work on my site. i don′t know why…

    do you have the code in action?
    Please send me your demo-site!

    Thank′s a lot!

    Thread Starter ulrich.stettler

    (@ulrichstettler)

    Hi

    Yes, the code is on https://nccr-planets.ch/ in action.

    Have you put the code inside of the the-events-calendar-shortcode.php and add the button=’true’ to the shortcode in the content?

    Regards, Ulrich

    guiberlin

    (@guiberlin)

    Hi there,

    thank you for the code but unfortunately, I don’t manage to display it either.

    Here is the code I insterted after “Venue”

    case 'venue' :
    							if( self::isValid($atts['venue']) ) {
    								$output .= '<span class="duration venue"><em> at </em>' . apply_filters( 'ecs_event_list_venue', tribe_get_venue(), $atts ) . '</span>';
    							}
    							break;
    
    						case 'button' :
    							if( self::isValid($atts['button']) ) {
    								$output .= "<form action='".get_permalink($id)."'><input type='submit' class='tribe-events-read-more' value='read more'></form>";
    							}
    							break;

    and my shortcode:

    [ecs-list-events excerpt='true' button='true']

    I’d be really thankful for some help ??

    Guillaume

    Thread Starter ulrich.stettler

    (@ulrichstettler)

    Hi

    Try to add the line 'button' => 'true', between $atts = shortcode_atts( array( and ), $atts, ‘ecs-list-events’ ); (. The position you are choose is not important.

    Ulrich

    Plugin Author Brian Hogg

    (@brianhogg)

    Note that on plugin update these changes would be lost, I’ll see if I can add this option or the ability to add it via a filter/action in the next release. Thanks!

    Brian Hogg,

    Would love to see the button feature added in the next update. Great plugin, thank you!

    Hi Brian
    That would be great if you could as I keep having to update the shortcode php file every time there’s an update. Thanks!

    In addition to what ulrich.stettler said I also had to include the button in the contentorder to have it show up:

    'contentorder' => 'title, thumbnail, excerpt, date, venue, button',

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘read more button on bottom’ is closed to new replies.