Forum Replies Created
-
Author
-
fersampParticipant
Hi Andrei,
Thank you for your help: I tried your code but it doesn’t work.Here plugin genuine shortcode:
COPY CODEfunction 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.
fersampParticipantHi Laura,
I have news about my problem:In kleo tab I used this custom shortcode
COPY CODEfunction 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
fersampParticipantI mean other shortcode, not kleo, for example custom code.
I need to show WPML selector with this code<?php do_action('wpml_add_language_selector'); ?>
Is it correct this function?
COPY CODEfunction language_selector() { // Code do_action('wpml_add_language_selector'); } add_shortcode( 'add_language_selector', 'language_selector' );
fersampParticipantIt’s still a white background…sorry, I inserted this
COPY CODE.top-menu .dropdown-menu li a:hover { background: green !important; }
into quick css
-
AuthorPosts