Search
 
SCRIPT & CODE EXAMPLE
 

PHP

filter data in wordpress

jQuery(window).on("load", function() {
	  var $grid = jQuery('.port-grid1').isotope({
		itemSelector: '.grid-port1',
		percentPosition: true,
		masonry: {
		  // use outer width of grid-sizer for columnWidth
		  columnWidth: '.grid-port1'
		}
	  });

	  jQuery('.item-filter').on('click', '.gallery-btn', function () {
		var filterValue = $(this).attr('data-filter');
		jQuery('.port-grid').isotope({
		  filter: filterValue
		});
	  });
	  
	  jQuery('select.item-filter').on('change', function() {
	  	var filterValue = $(".item-filter option:selected").attr("data-filter")
		jQuery('.port-grid').isotope({
		  filter: filterValue
		});
	  });
});

<select class="item-filter item-filter-v2 list-inline">
                <option class="active gallery-btn" data-filter=".All">All genres</option>
                <?php	
				foreach ($tax_terms_book  as $tax_term) {
					$tax_term_id = $tax_term->term_id; 									
					?>
					<option class="gallery-btn" <?php  echo "data-filter='.bookg-$tax_term_id'"; ?>><?php echo $tax_term->name; ?></option>
				<?php
				} 
				?>	
            </select>
                  
                  
                    <div class="col-md-4 grid-port1 grid-port All <?php foreach ($portfolio_terms_id as $portfolio_term_id) { echo "bookg-"; echo $portfolio_term_id; echo " "; }?>">
Comment

PREVIOUS NEXT
Code Example
Php :: zsh: command not found: php mac 
Php :: php doctrine findby greater than 
Php :: $this meaning in codeigniter 
Php :: php division without round 
Php :: Display out of stock products last (even after sort) - Woocommerce 
Php :: symfony translation variable in twig 
Php :: dompdf setoptions breaks images 
Php :: Comment rediriger la page “Panier” et sauter la page Commande 
Php :: php strom key 2 
Php :: write to error log opencart 
Php :: wprest api remove content from response 
Php :: laravel download file from storage with progress bar 
Php :: net::ERR_CONNECTION_REFUSED php 
Php :: PHP SSRF Wrapper/URL Schema 
Php :: one to one relationship laravel 
Php :: php array dot notation 
Php :: php edit user profile 
Php :: laravel where search like with space 
Php :: WordPress Emojis abschalten 
Php :: WooCommerce: Add Content to a Specific Order Email 
Php :: detect change in log file in real time php 
Php :: advanced custom fields echo string replace 
Php :: wp wc php remove product from cart if amount is 0 
Php :: get datetime of excel cell in codeigniter 
Php :: laravel chain query builder 
Php :: GZIP COMPRESSION Using PHP 
Php :: twig lower case and string replace 
Php :: codeigniter pagination example 
Php :: teaching php in interactive mode 
Php :: PHP how to skip file upload if file already exist 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =