function design_shortcode() {
$terms = get_the_terms($post->ID, 'pa_design');
if ($terms && !is_wp_error($terms)) {
foreach ($terms as $term)
$design_name = $term->name;
$design_slug = $term->slug;
}
if ($design_name != ''){
echo do_shortcode( '[product_attribute attribute="design" filter="'.$design_slug.'" per_page="6" columns="6" orderby="rand" order="rand"]' ); }
}
add_shortcode('alldesing', 'design_shortcode');
function primary_color_shortcode() {
$terms = get_the_terms($post->ID, 'pa_primary-color');
if ($terms && !is_wp_error($terms)) {
foreach ($terms as $term)
$primary_color_name = $term->name;
$primary_color_slug = $term->slug;
}
if ($primary_color_name != ''){
echo '<h3 class="main-title uppercase" align="left">Другие товары в цвете '.$primary_color_name.'</h2>'
echo do_shortcode( '[product_attribute attribute="primary-color" filter="'.$primary_color_slug.'" per_page="6" columns="6" orderby="rand" order="rand"]' ); }
}
add_shortcode('allprimarycolor', 'primary_color_shortcode');
get_post_meta($post->ID, '_yoast_wpseo_title', true);
function filter_wpseo_opengraph_title( $title ) {
if($GLOBALS['super_seo_title']) {
$title = $GLOBALS['super_seo_title'];
}
return $title;
};
if(!get_post_meta($post->ID, '_yoast_wpseo_title', true) ){
$GLOBALS['super_seo_title'] = 'свой тайтл';
}
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Redirect</title>
<script type="text/javascript"> // <![CDATA[
//iPhone Version:
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
window.location = "https://ВАША_ССЫЛКА_НА СТРАНИЦУ_В_APP_STORE";
}
//Android Version:
if(navigator.userAgent.match(/android/i)) {
window.location = "https://ВАША_ССЫЛКА_НА СТРАНИЦУ_В_GOOGLE_PLAY";
}
</script>
</body>
</html>
/www/sitename/
.git
public
/www/sitename/public/