title: Wordpress Divi Theme Link to Filtered Portfolio Category
body: <p>I'm using the current version of the Divi 2.0 theme and Wordpress.  The theme uses a filterable portfolio gallery that a user can click to filter between categories.  The links are # and instead I think the click is passed using: data-category-slug="%1$s"</p>
  
  <p>Where "%1$s" is the name of the category.  I've tried adding "%1$s" to the end of the #link, but it doesn't work.</p>
  
  <p>Theme function:</p>
  
  <pre><code>function et_pb_filterable_portfolio( $atts ) {
  extract( shortcode_atts( array(
          'module_id' =&gt; '',
          'module_class' =&gt; '',
          'fullwidth' =&gt; 'on',
          'posts_number' =&gt; 10,
          'include_categories' =&gt; '',
          'show_title' =&gt; 'on',
          'show_categories' =&gt; 'on',
          'show_pagination' =&gt; 'on',
          'background_layout' =&gt; 'light',
      ), $atts
  ) );
  
  wp_enqueue_script( 'jquery-masonry-3' );
  wp_enqueue_script( 'hashchange' );
  
  $args = array();
  
  if( 'on' === $show_pagination ) {
      $args['nopaging'] = true;
  } else {
      $args['posts_per_page'] = (int) $posts_number;
  }
  
  if ( '' !== $include_categories ) {
      $args['tax_query'] = array(
          array(
              'taxonomy' =&gt; 'project_category',
              'field' =&gt; 'id',
              'terms' =&gt; explode( ',', $include_categories ),
              'operator' =&gt; 'IN',
          )
      );
  }
  
  $projects = et_divi_get_projects( $args );
  
  $categories_included = array();
  ob_start();
  if( $projects-&gt;post_count &gt; 0 ) {
      while ( $projects-&gt;have_posts() ) {
          $projects-&gt;the_post();
  
          $category_classes = array();
          $categories = get_the_terms( get_the_ID(), 'project_category' );
          if ( $categories ) {
              foreach ( $categories as $category ) {
                  $category_classes[] = 'project_category_' . urldecode( $category-&gt;slug );
                  $categories_included[] = $category-&gt;term_id;
              }
          }
  
          $category_classes = implode( ' ', $category_classes );
  
          ?&gt;
          &lt;div id="post-&lt;?php the_ID(); ?&gt;" &lt;?php post_class( 'et_pb_portfolio_item ' . $category_classes ); ?&gt;&gt;
          &lt;?php
              $thumb = '';
  
              $width = 'on' === $fullwidth ?  1080 : 400;
              $width = (int) apply_filters( 'et_pb_portfolio_image_width', $width );
  
              $height = 'on' === $fullwidth ?  9999 : 284;
              $height = (int) apply_filters( 'et_pb_portfolio_image_height', $height );
              $classtext = 'on' === $fullwidth ? 'et_pb_post_main_image' : '';
              $titletext = get_the_title();
              $thumbnail = get_thumbnail( $width, $height, $classtext, $titletext, $titletext, false, 'Blogimage' );
              $thumb = $thumbnail["thumb"];
  
              if ( '' !== $thumb ) : ?&gt;
                  &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;
                  &lt;?php if ( 'on' !== $fullwidth ) : ?&gt;
                      &lt;span class="et_portfolio_image"&gt;
                  &lt;?php endif; ?&gt;
                          &lt;?php print_thumbnail( $thumb, $thumbnail["use_timthumb"], $titletext, $width, $height ); ?&gt;
                  &lt;?php if ( 'on' !== $fullwidth ) : ?&gt;
                          &lt;span class="et_overlay"&gt;&lt;/span&gt;
                      &lt;/span&gt;
                  &lt;?php endif; ?&gt;
                  &lt;/a&gt;
          &lt;?php
              endif;
          ?&gt;
  
          &lt;?php if ( 'on' === $show_title ) : ?&gt;
              &lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
          &lt;?php endif; ?&gt;
  
          &lt;?php if ( 'on' === $show_categories ) : ?&gt;
              &lt;p class="post-meta"&gt;&lt;?php echo get_the_term_list( get_the_ID(), 'project_category', '', ', ' ); ?&gt;&lt;/p&gt;
          &lt;?php endif; ?&gt;
  
          &lt;/div&gt;&lt;!-- .et_pb_portfolio_item --&gt;
          &lt;?php
      }
  }
  
  wp_reset_postdata();
  
  $posts = ob_get_clean();
  
  $categories_included = explode ( ',', $include_categories );
  $terms_args = array(
      'include' =&gt; $categories_included,
      'orderby' =&gt; 'name',
      'order' =&gt; 'ASC',
  );
  $terms = get_terms( 'project_category', $terms_args );
  
  $category_filters = '&lt;ul class="clearfix"&gt;';
  $category_filters .= sprintf( '&lt;li class="et_pb_portfolio_filter et_pb_portfolio_filter_all"&gt;&lt;a href="#" class="active" data-category-slug="all"&gt;%1$s&lt;/a&gt;&lt;/li&gt;',
      esc_html__( 'All', 'Divi' )
  );
  foreach ( $terms as $term  ) {
      $category_filters .= sprintf( '&lt;li class="et_pb_portfolio_filter"&gt;&lt;a href="#" data-category-slug="%1$s"&gt;%2$s&lt;/a&gt;&lt;/li&gt;',
          esc_attr( urldecode( $term-&gt;slug ) ),
          esc_html( $term-&gt;name )
      );
  }
  $category_filters .= '&lt;/ul&gt;';
  
  $class = " et_pb_bg_layout_{$background_layout}";
  
  $output = sprintf(
      '&lt;div%5$s class="et_pb_filterable_portfolio %1$s%4$s%6$s" data-posts-number="%7$d"%10$s&gt;
          &lt;div class="et_pb_portfolio_filters clearfix"&gt;%2$s&lt;/div&gt;&lt;!-- .et_pb_portfolio_filters --&gt;
  
          &lt;div class="et_pb_portfolio_items_wrapper %8$s"&gt;
              &lt;div class="column_width"&gt;&lt;/div&gt;
              &lt;div class="gutter_width"&gt;&lt;/div&gt;
              &lt;div class="et_pb_portfolio_items"&gt;%3$s&lt;/div&gt;&lt;!-- .et_pb_portfolio_items --&gt;
          &lt;/div&gt;
          %9$s
      &lt;/div&gt; &lt;!-- .et_pb_filterable_portfolio --&gt;',
      ( 'on' === $fullwidth ? 'et_pb_filterable_portfolio_fullwidth' : 'et_pb_filterable_portfolio_grid clearfix' ),
      $category_filters,
      $posts,
      esc_attr( $class ),
      ( '' !== $module_id ? sprintf( ' id="%1$s"', esc_attr( $module_id ) ) : '' ),
      ( '' !== $module_class ? sprintf( ' %1$s', esc_attr( $module_class ) ) : '' ),
      esc_attr( $posts_number),
      ('on' === $show_pagination ? '' : 'no_pagination' ),
      ('on' === $show_pagination ? '&lt;div class="et_pb_portofolio_pagination"&gt;&lt;/div&gt;' : '' ),
      is_rtl() ? ' data-rtl="true"' : ''
  );
  
  return $output;
  }
  </code></pre>
  
  <p>localhost page source:</p>
  
  <p>localhost page source:</p>
  
  <pre><code>                &lt;div class="et_pb_row"&gt;
          &lt;div class="et_pb_column et_pb_column_4_4"&gt;
          &lt;div class="et_pb_filterable_portfolio et_pb_filterable_portfolio_grid clearfix et_pb_bg_layout_light" data-posts-number="10"&gt;
          &lt;div class="et_pb_portfolio_filters clearfix"&gt;&lt;ul class="clearfix"&gt;&lt;li class="et_pb_portfolio_filter et_pb_portfolio_filter_all"&gt;&lt;a href="#" class="active" data-category-slug="all"&gt;All&lt;/a&gt;&lt;/li&gt;&lt;li class="et_pb_portfolio_filter"&gt;&lt;a href="#" id="verizon-4g-lte-smartphones" data-category-slug="verizon-4g-lte-smartphones"&gt;4G LTE Smartphones&lt;/a&gt;&lt;/li&gt;&lt;li class="et_pb_portfolio_filter"&gt;&lt;a href="#" id="verizon-connected-devices" data-category-slug="verizon-connected-devices"&gt;Specialty Devices&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;!-- .et_pb_portfolio_filters --&gt;
  
          &lt;div class="et_pb_portfolio_items_wrapper "&gt;
              &lt;div class="column_width"&gt;&lt;/div&gt;
              &lt;div class="gutter_width"&gt;&lt;/div&gt;
              &lt;div class="et_pb_portfolio_items"&gt;         &lt;div id="post-253" class="post-253 project type-project status-publish has-post-thumbnail hentry et_pb_portfolio_item project_category_verizon-4g-lte-smartphones"&gt;
                              &lt;a href="http://localhost/project/galaxy-note-edge-by-samsung/"&gt;
                                          &lt;span class="et_portfolio_image"&gt;
                                              &lt;img src="http://localhost/wp-content/uploads/2015/02/devices-samsung-note-edge-thumb3-216x284.png" alt='Galaxy Note™ Edge by Samsung' width='400' height='284' /&gt;                                              &lt;span class="et_overlay"&gt;&lt;/span&gt;
                      &lt;/span&gt;
                                      &lt;/a&gt;
  
                          &lt;h2&gt;&lt;a href="http://localhost/project/galaxy-note-edge-by-samsung/"&gt;Galaxy Note™ Edge by Samsung&lt;/a&gt;&lt;/h2&gt;
  
                          &lt;p class="post-meta"&gt;&lt;a href="http://localhost/project_category/verizon-4g-lte-smartphones/" rel="tag"&gt;4G LTE Smartphones&lt;/a&gt;&lt;/p&gt;
  
          &lt;/div&gt;&lt;!-- .et_pb_portfolio_item --&gt;
                      &lt;div id="post-97" class="post-97 project type-project status-publish has-post-thumbnail hentry et_pb_portfolio_item project_category_verizon-connected-devices"&gt;
                              &lt;a href="http://localhost/project/lg-gizmopal/"&gt;
                                          &lt;span class="et_portfolio_image"&gt;
                                              &lt;img src="http://localhost/wp-content/uploads/2015/02/devices-gizmopal-thumb-216x284.png" alt='GizmoPal™ by LG' width='400' height='284' /&gt;                                             &lt;span class="et_overlay"&gt;&lt;/span&gt;
                      &lt;/span&gt;
                                      &lt;/a&gt;
  
                          &lt;h2&gt;&lt;a href="http://localhost/project/lg-gizmopal/"&gt;GizmoPal™ by LG&lt;/a&gt;&lt;/h2&gt;
  
                          &lt;p class="post-meta"&gt;&lt;a href="http://localhost/project_category/verizon-connected-devices/" rel="tag"&gt;Specialty Devices&lt;/a&gt;&lt;/p&gt;
  
          &lt;/div&gt;&lt;!-- .et_pb_portfolio_item --&gt;
          &lt;/div&gt;&lt;!-- .et_pb_portfolio_items --&gt;
          &lt;/div&gt;
          &lt;div class="et_pb_portofolio_pagination"&gt;&lt;/div&gt;
      &lt;/div&gt; &lt;!-- .et_pb_filterable_portfolio --&gt;
      &lt;/div&gt; &lt;!-- .et_pb_column --&gt;
      &lt;/div&gt; &lt;!-- .et_pb_row --&gt;
  
      &lt;/div&gt; &lt;!-- .et_pb_section --&gt;
                  &lt;/div&gt; &lt;!-- .entry-content --&gt;
  
  
              &lt;/article&gt; &lt;!-- .et_pb_post --&gt;
  
  
  
  &lt;/div&gt; 
  </code></pre>
  
  <p>I want to link from one page to the filtered portfolio with a filter already selected?  Any help is appreciated.</p>
  
  <p>-Ranks</p>