<script>var scr = {"scripts":[
{"src" : "ваш_скрипт.js", "async" : false},
]};!function(t,n,r){"use strict";var c=function(t){if("[object Array]"!==Object.prototype.toString.call(t))return!1;for(var r=0;r<t.length;r++){var c=n.createElement("script"),e=t[r];c.src=e.src,c.async=e.async,n.body.appendChild(c)}return!0};t.addEventListener?t.addEventListener("load",function(){c(r.scripts);},!1):t.attachEvent?t.attachEvent("onload",function(){c(r.scripts)}):t.onload=function(){c(r.scripts)}}(window,document,scr);
</script>
SetEnvIfNoCase User-Agent "^Yandex" search_bot
SetEnvIfNoCase User-Agent "^Yahoo" search_bot
SetEnvIfNoCase User-Agent "^Googlebot" search_bot
SetEnvIfNoCase User-Agent "^Aport" search_bot
SetEnvIfNoCase User-Agent "^msnbot" search_bot
SetEnvIfNoCase User-Agent "^spider" search_bot
SetEnvIfNoCase User-Agent "^Robot" search_bot
SetEnvIfNoCase User-Agent "^php" search_bot
SetEnvIfNoCase User-Agent "^Mail" search_bot
SetEnvIfNoCase User-Agent "^bot" search_bot
SetEnvIfNoCase User-Agent "bot" search_bot
SetEnvIfNoCase User-Agent "^igdeSpyder" search_bot
SetEnvIfNoCase User-Agent "^Snapbot" search_bot
SetEnvIfNoCase User-Agent "^WordPress" search_bot
SetEnvIfNoCase User-Agent "^BlogPulseLive" search_bot
SetEnvIfNoCase User-Agent "^Parser" search_bot
SetEnvIfNoCase User-Agent "^Googlebot-Image" search_bot
SetEnvIfNoCase User-Agent "^StackRambler" search_bot
SetEnvIfNoCase User-Agent "^Adsbot-Google" search_bot
SetEnvIfNoCase User-Agent "^WebAlta" search_bot
SetEnvIfNoCase User-Agent "^Googlebot-Mobile" search_bot
SetEnvIfNoCase User-Agent "^YandexImages" search_bot
SetEnvIfNoCase User-Agent "http://www.google.com/bot.html" search_bot
<FilesMatch "^.*$">
Order Allow,Deny
Allow from all
Deny from env=search_bot
</FilesMatch>
add_filter( 'woocommerce_cart_product_price', 'my_pricetext_for_cat' );
function my_pricetext_for_cat( $product_price ) {
// Здесь ваш код
return "Цена от: ".$product_price;
}
<script>
var scr = {"scripts":[
{"src" : "http://path_to_form.js", "async" : false},
]};!function(t,n,r){"use strict";var c=function(t){if("[object Array]"!==Object.prototype.toString.call(t))return!1;for(var r=0;r<t.length;r++){var c=n.createElement("script"),e=t[r];c.src=e.src,c.async=e.async,n.body.appendChild(c)}return!0};t.addEventListener?t.addEventListener("load",function(){c(r.scripts);},!1):t.attachEvent?t.attachEvent("onload",function(){c(r.scripts)}):t.onload=function(){c(r.scripts)}}(window,document,scr);
</script>
//Цепляем свою функцию
add_action( 'woocommerce_product_meta_start', 'woocommerce_infobox_single_before_meta' );
function woocommerce_infobox_single_before_meta() {
// Здесь можете вывести любой код, который вам нужно
echo '<div class="single-product-infobox">Дополнительная информация</div>';
}
global $product;
echo '<a href="'.get_permalink($product->post->id).'">Якорь ссылки</a>';
// Add Wrapper to Product Info
function rocket_wrap_before_product_desc() {
echo '<div class="product-info">';
}
add_action( 'woocommerce_before_shop_loop_item_title', 'rocket_wrap_before_product_desc', 10);
function rocket_wrap_after_product_desc() {
echo '</div>';
}
add_action( 'woocommerce_shop_loop_item_title', 'rocket_wrap_after_product_desc', 20);
// Add Wrapper to Product Info
function rocket_wrap_before_product_desc() {
global $product;
echo '<div class="product-info"><a href="'.get_permalink($product->post->id).'">';
}
add_action( 'woocommerce_before_shop_loop_item_title', 'rocket_wrap_before_product_desc', 10);
function rocket_wrap_after_product_desc() {
echo '</a></div>';
}
add_action( 'woocommerce_shop_loop_item_title', 'rocket_wrap_after_product_desc', 20);