Search
 
SCRIPT & CODE EXAMPLE
 

PHP

add header image to woocomerce shop page

//Check is_shop - Shop base page
        // if True then Show Category Header Content of The first Product in Shop base Page 
        
if (is_shop()) {
        $args = array('taxonomy' => 'product_cat');
        $product_categories = get_categories( $args  );
        $term_id = $product_categories[0]->term_id;  
        $content = get_term_meta($term_id, 'cat_meta');
        if(isset($content[0]['cat_header'])){
            echo do_shortcode($content[0]['cat_header']);
        }
}
Comment

PREVIOUS NEXT
Code Example
Php :: pass address of array in php 
Php :: convert php code to html online 
Php :: how to call a function in model from a controller 
Php :: building an ecommerce website with laravel 
Php :: examples of invalid php variables 
Php :: Available excel column formatting 
Php :: codeigniter get view as string 
Php :: how to import csv into database in laravel 
Php :: yii relations 
Php :: laravel sintax 
Php :: add variables to line in laravel notification 
Php :: $score = $score + $bonus Score; return $score; php 
Php :: echo fread($myfile,filesize("webdictionary.txt")); 
Php :: laravel view 
Php :: evaluate home tilde ~ in php 
Php :: Wordpress Scheduled Post to be viewable on front end 
Php :: edit paginator object 
Php :: Undefined array key after unset() 
Php :: laravel tinker to test email on server 
Php :: laravel collection intersectKey 
Php :: org.springframework.web.context.request.async.AsyncRequestTimeoutExceptionTimeoutDeferredResultProcessingInterceptor 
Php :: validations php or js 
Php :: How to add page heading in FPDF PHP 
Php :: php variable undefined inside function argument 
Php :: why are my css properties not being applied to php file 
Php :: mod_fcgid: stderr: PHP Fatal error: Maximum execution time of 0 seconds exceeded in /home/circusconcepts/public_html/shop/system/library/PHPExcel/Shared/String.php on line 576 
Php :: php update json file 
Php :: php code for adding dara 
Php :: wp wc trim zero 
Php :: bin/cake cache clear_all 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =