This topic has 5 replies, 3 voices, and was last updated 8 years by Andrei.

  • Author
  • #104734
     fersamp
    Participant

    Hi,

    I have problems with pre tag( I suppose ): I have Kleo theme with Events Manager plugin installed.

    In the home page I have an events list in a Kleo Tab with a table representation: I have problem with this visualization because there’s too space among the elements.

    You can see it in my home page.

     

    Is there some theme customization for table that add ‘pre’ tag or the problem could be another?

    I already ask to Events Manager support and they answer me:

    Maybe contact your Theme people where the pre tag is being inserted. 

    I imagine in one of the Templates.. or page.php, post.php the tag is being inserted.

    Problem could be this class.

    COPY CODE
    <div class="wpb_wrapper">
    			<pre></pre>
    
    		</div>

     

    #104905
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #105666
     fersamp
    Participant

    Hi Laura,
    I have news about my problem:

    In kleo tab I used this custom shortcode

    COPY CODE
    function display_custom_events( $attr, $content = null ) {
    	echo do_shortcode('[events_list scope="' . $content. '" limit=5 pagination=1 ][/events_list]');
    	return '';
    	
    }
    add_shortcode('custom_events', 'display_custom_events');

    That simply invoke the Events Manager shortcode ‘[events_list scope=”####” limit=5 pagination=1 ][/events_list]’

    So, the pre tag is prettly linked to add_shortcode method, in particular to the class wpb_wrapper that create a blank pre tag:

    COPY CODE
    <div class="wpb_wrapper">
    			<pre></pre>
     
    		</div>

    How can I remove this pre tag when shortcode is invoked?

    Thank you for help

    #105953
     Andrei
    Moderator

    Try it this way:

    COPY CODE
    
    function display_custom_events( $attr, $content = null ) {
    ob_start();	
    echo do_shortcode('[events_list scope="' . $content. '" limit=5 pagination=1 ][/events_list]');
    return ob_get_clean();	
    }
    

    If the pre tag is still present then it means it comes from the events_list shortcode, also be sure you’re checking the “text” source of your page content where you’re using this shortcode, maybe you copy/pasted using a pre tag.

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #106296
     fersamp
    Participant

    Hi Andrei,
    Thank you for your help: I tried your code but it doesn’t work.

    Here plugin genuine shortcode:

    COPY CODE
    function em_get_events_list_shortcode($args, $format='') {
    	$args = (array) $args;
    	$args['ajax'] = isset($args['ajax']) ? $args['ajax']:(!defined('EM_AJAX') || EM_AJAX );
    	$args['format'] = ($format != '' || empty($args['format'])) ? $format : $args['format']; 
    	$args['format'] = html_entity_decode($args['format']); //shortcode doesn't accept html
    	$args['limit'] = isset($args['limit']) ? $args['limit'] : get_option('dbem_events_default_limit');
    	if( empty($args['format']) && empty($args['format_header']) && empty($args['format_footer']) ){
    		ob_start();
    		if( !empty($args['ajax']) ){ echo '<div class="em-search-ajax">'; } //open AJAX wrapper
    		em_locate_template('templates/events-list.php', true, array('args'=>$args));
    		if( !empty($args['ajax']) ) echo "</div>"; //close AJAX wrapper
    		$return = ob_get_clean();
    	}else{
    		$args['ajax'] = false;
    		$pno = ( !empty($args['pagination']) && !empty($_GET['pno']) && is_numeric($_GET['pno']) )? $_GET['pno'] : 1;
    		$args['page'] = ( !empty($args['pagination']) && !empty($args['page']) && is_numeric($args['page']) )? $args['page'] : $pno;
    		$return = EM_Events::output( $args );
    	}
    	return $return;
    }
    add_shortcode ( 'events_list', 'em_get_events_list_shortcode' );

    But I don’t understand where pre tag is created.

    #106784
     Andrei
    Moderator

    I’m sorry, this is way to custom and out of theme support scope because most probably will require some good amount of time to understand your code, debug it and fix it.

    Please let me know if I can help you with anything else.

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?