Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to override category product from seo title and description

add_filter( 'wpseo_title', 'uppercase_seo_title' );
function uppercase_seo_title( $title ) {
 global $post;
$cate = get_queried_object();
$cate_name = $cate->name;
$product_name = get_the_title();
if(is_tax('product_cat')){ 
$title = "Buy".' '. $cate_name .' - '. "UK's Best Online Price";	
}
else if(is_product()){
	$title = "Buy".' '. $cate_name .' '. $product_name .' - '. " UK's Best Online Price";
}
return $title;
}
add_filter('wpseo_metadesc','jkc_custom_meta');
function jkc_custom_meta($desc){
	global $post;
	$cate = get_queried_object();
	$cate_name = $cate->name;
	$product_name = get_the_title();                          
			if(is_tax('product_cat')){ 

			$desc = "Looking for".' ' .$cate_name. " ? Japanese knife company provide you original Japanese premium quality".' '. $cate_name .' '. "with the UK's best online price.";
			}
			else if(is_product()){
				$desc = "Looking for".' ' .$product_name. " ? Japanese knife company provide you original Japanese premium quality".' '. $cate_name .' '. "with the UK's best online price.";
			}
			return $desc;
}
	
Comment

PREVIOUS NEXT
Code Example
Php :: setup wp cron from external / cpanel cron service 
Php :: composer new project laravel acl 
Php :: How to add logo in FPDF PHP 
Php :: image downlord 
Php :: how to write a php program for an electricity bill using if-else conditions 
Php :: SMARTY compose variable key array 
Php :: php getgmail name 
Php :: select next occurrence phpstorm 
Php :: print array blade laravel 
Php :: how to make diffrent php pages have diffrent styles 
Php :: ultimo numeto php 
Php :: laravel helper functions 
Php :: current date time in php for input 
Php :: just page name in url 
Php :: how to get the ip address of the client in php 
Php :: how to store array in variable php 
Php :: store a variable in session and echo that variable on a page wordpress 
Php :: how to do taxonomy filter in wordpress 
Php :: bootstap 5 add scrollbar 
Php :: use php-fpm with apache 
Java :: spigot execute command as console 
Java :: spigot broadcast message 
Java :: rgb to hex java 
Java :: android java close app 
Java :: Share application “link” in Android 
Java :: how to write on top of equal sign in latex 
Java :: java file dialog 
Java :: java cast duration to long 
Java :: java android play sound file with variable 
Java :: how to clear a text file in java 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =