Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Multiple Tags Filtering #733125

    Hi kennethm

    I created a function at functions.php to generate a shortcode to filtering…

    slugtag = slug of the tag that you need filtering
    idcat = id of the tag that you need filtering
    qtdposts = number of posts that you want to display

    How it works?
    display all posts with the category + slug

    [tagespecifica idcat=”ID OF CATEGORY” slugtag=”NAME OF TAG” qtdpost=”NUMBER OF POSTS TO DISPLAY”]

    function tagespecifica($atts, $content){
    	extract( shortcode_atts( array(
    		'slugtag' => '',
    		'idcat' => '',
    		'qtdposts' => ''
    	), $atts, 'tagespecifica' ));
    	$count = 0;
    
    	$content .= '<div class="avia-content-slider avia-content-grid-active avia-content-slider-even">';
    	$content .= '<div class="avia-content-slider-inner">';
    	$content .= '<div class="slide-entry-wrap">';
    	query_posts('cat='.$idcat.'&showposts='.$qtdposts.'&tag='.$slugtag); 
    	while (have_posts()) : the_post();
    	if ($count === 0) {
    		$classFirst = 'first';
    	} else { $classFirst = '';}
    	$content .= '<article class="slide-entry flex_column  post-entry slide-entry-overview slide-loop-1 slide-parity-odd  av_one_fourth real-thumbnail '.$classFirst.' ">';
    	$content .= '<a href="'.get_the_permalink().'" class="slide-image">';
    	$content .= '<div class="imgthumb">'.get_the_post_thumbnail(null,'portfolio').'<span class="image-overlay overlay-type-extern"><span class="image-overlay-inside"></span></span></a>';
    	$content .= '<div class="slide-content"><header class="entry-content-header">';
    	$content .= '<h3 class="slide-entry-title entry-title" itemprop="headline">';
    	$content .= '<a href="'.get_the_permalink().'" title="'.get_the_title().'">'.get_the_title().'</a></h3>';
    	$content .= '<span class="av-vertical-delimiter"></span></header></div></article>';
    	$count++;
    	endwhile;
    	$content .= '</div></div></div>';
      wp_reset_query();
    	return $content;
    }
    
    add_shortcode( 'tagespecifica' , 'tagespecifica' );
    • This reply was modified 7 years, 11 months ago by denispiaia.
    in reply to: Multiple Tags Filtering #732705

    I was looking for something like this.
    Is gonna be awesome if Enfold theme could use the wordpress conditional tags for choose what I want to display in my blog page.

    in reply to: Enfold unable to edit pages #314228

    I have the same issue

    in reply to: Button Shortcode #290384

    yes my server running HHVM

Viewing 4 posts - 1 through 4 (of 4 total)