Support » Plugin: The Events Calendar Extension: Registration » [enh] Ability to put the “Register Now” button anywhere

  • Hi there.

    I would like to request a new feature for the Event Registration Plug-in: the ability to put the “Register Now” button anywhere on my WP site.

    For example, in a blog post or on the main landing page, I want to have some text and just toss the registration button between two paragraphs. As implemented now, I need to put a link to the actual calendar page and then, the user must click a second time to get to the registration page. I want a single click, not two clicks. Looks cleaner.

    I have a work around: a new shortcode for “wpecr_anywhere_registration_button”. Usage:

    	title="Beginner PHP Class"
    	date="2016-09-26 04:00:00"
    	id="262"    ]

    This is for more advanced users, since you need the ID number which has to be obtained from the Events calendar list. But, for our purposes, this seems to work well. If the ID is done correctly, it should integration into your pro-version software too.

    Do you think you could take a look and incorporate this into your next version? You may also have a better solution in mind, that’d be great too.



        /** I am not a PHP programmer, so please feel free to make this better */
        public function wpecr_anywhere_registration_button( $atts ) {
    		extract( shortcode_atts(array(
    				'id' => 'NONE_GIVEN',
    				'title' => 'NONE_GIVEN',
    				'date' => 'NONE_GIVEN',
    				'price' => 'NONE_GIVEN',
    			), $atts,  'wpecr_anywhere_registration_button'));
    		$event_id = $atts['id'];
    		$event_title = $atts['title'];
    		$event_date  = $atts['date'];
    		$event_price = $atts['price'];
    		$data = 
    			'<form action="' .$this->registration_button_url(). '" method="post" class="wpecr_registration">
    				<input type="hidden" name="wpecr[event_id]" value="'. $event_id .'">
    				<input type="hidden" name="wpecr[event]" value="'. $event_title .'">
    				<input type="hidden" name="wpecr[date]" value="'. $event_date .'">
    				<input type="hidden" name="wpecr[price]" value="'. $event_price .'">
    				<button type="submit" name="submit" class="wpecr_button">'.__( 'Register now', 'wpecr' ).'</button>
    		return $data;
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[enh] Ability to put the “Register Now” button anywhere’ is closed to new replies.