Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php print products with attribute

$all_ids = get_posts( array(
        'post_type' => 'product',
        'numberposts' => -1,
        'post_status' => 'publish',
        'fields' => 'ids',
		'tax_query' => array(
         array(
            'taxonomy' => 'pa_years', // Hover over "Configure terms" and look for taxonomy=pa_years in the link
            'field' => 'slug',
            'terms' => '2016', // Is the slug under "Configure terms"
            'operator' => 'IN',
         )
      ),
   ) );
   /*foreach ( $all_ids as $id ) {
        echo $id ."<br>";
   }*/
Comment

PREVIOUS NEXT
Code Example
Php :: many posts in the isset 
Php :: df/mpdf/src/Cache.php on line 21 
Php :: laravel tips 
Php :: php array_diff vs array_diff_assoc 
Php :: SQLSTATE[HY000]: General errorstring(58) 
Php :: convert code python to php 
Php :: get one random post wp 
Php :: Drupal 9 select node data with query conditions using entity type manager 
Php :: php read textarea line by line 
Php :: php get docblock with reflection 
Php :: to redo number_format php 
Php :: cakephp 3 migrations foreign key 
Php :: php input seperated by space 
Php :: title active php 
Php :: The provided cwd "C:laravel projectseccomer/../public_html" 
Php :: laravel make request 
Php :: rewrite rule wp blog to subdirectory 
Php :: create random username and password php 
Php :: php array_intersect_assoc 
Php :: How to on auto_recording using zoom api in php 
Php :: RequestCriteria laravel 
Php :: Change initial country + add top countiries on Caldera forms 
Php :: multi domain codeigniter 
Php :: yii1 anchor tag 
Php :: update request php-salesforce-rest-api 
Php :: Add class to menu anchors 
Php :: laravel helper functions 
Php :: push element in array php 
Php :: php send values in $_SESSION to other page 
Php :: provide difference between interface and abstract class php 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =