add_action( ‘after_setup_theme’, ‘yourtheme_setup’ );
function yourtheme_setup() {
add_theme_support( ‘wc-product-gallery-zoom’ );
add_theme_support( ‘wc-product-gallery-lightbox’ );
add_theme_support( ‘wc-product-gallery-slider’ );
}
/**********************Add js to js file on header or footer*********************************/
$(window).load(function () {
setTimeout(function () {
var thubmNav = $(“.woocommerce-product-gallery .flex-control-nav”);
if (thubmNav.length) {
//console.log(“asd”, !thubmNav.closest(“.navWrapper”).length)
if (!thubmNav.closest(“.navWrapper”).length) {
thubmNav.addClass(“slides”);
thubmNav.wrap(“
“);
$(‘.navWrapper’).flexslider({
animation: “slide”,
controlNav: false,
animationLoop: true,
slideshow: false,
itemWidth: 100,
itemMargin: 24,
maxItems: 4,
minItems: 3,
});
}
}
}, 100)
});
/****************Variation product js code ****************************************/
$(“.variations_form”).on(“wc_additional_variation_images_frontend_ajax_response_callback”, function (event, variation) {
console.log(“variation”);
setTimeout(function () {
var thubmNav = $(“.woocommerce-product-gallery .flex-control-nav”);
if (thubmNav.length) {
/*if(!thubmNav.parent().hasClass(“navWrapper”)){
thubmNav.wrap(“
“);
var itemsLength_ = thubmNav.children(“li”).length
var itemWidth_ = thubmNav.children(“li”).outerWidth();
thubmNav.width( itemWidth_* itemsLength_);
thubmNav.parent().css({“width”: $(“.woocommerce-product-gallery”).width(), “overflow”:”hidden”});
var navigationDiv_ = $(“
“, {class: “navigationWrapper”});
var leftNavigation_ = $(“
“, {class: “leftNavigation”});
var rightNavigation_ = $(““, {class: “rightNavigation”});
navigationDiv_.append(leftNavigation_).append(rightNavigation_);
navigationDiv_.insertAfter(thubmNav);
leftNavigation_.on(“click”, function(){
});
rightNavigation_.on(“click”, function(){
});
}*/
//console.log(“asd”, !thubmNav.closest(“.navWrapper”).length)
if (!thubmNav.closest(“.navWrapper”).length) {
thubmNav.addClass(“slides”);
thubmNav.wrap(“
“);
$(‘.navWrapper’).flexslider({
animation: “slide”,
controlNav: false,
animationLoop: false,
slideshow: false,
itemWidth: 100,
itemMargin: 24,
maxItems: 4,
minItems: 3,
});
}
}
}, 100)
});
You can download from here http://instafeedjs.com/
add_shortcode('instagram_blog','instagram_gallery_blog');
function instagram_gallery_blog($atts)
{
ob_start();
extract( shortcode_atts(
array(
), $atts )
);
if(isset($atts['item'])){
$iteam_limit = $atts['item'];
}else{
$iteam_limit = 6;
}
var feed = new Instafeed({
get: 'user',
userId: ,
accessToken: '',
target: 'instafeed',
resolution: 'standard_resolution',
sortBy:"most-recent",
limit :,
template:'',
after: function() {
}
});
window.onload = function() {
feed.run();
}
});
return ob_get_clean();
}
You can use this filter to sorting woocommerce product page review.
add_filter( ‘woocommerce_product_review_list_args’, ‘newest_reviews_first’ );
function newest_reviews_first($args) {
if($_GET[‘orderby’] ==”rating” && $_GET[‘order’] == ‘desc’){
$args[‘reverse_top_level’] = true;
}elseif($_GET[‘orderby’] ==”rating” && $_GET[‘order’] == ‘asc’){
$args[‘reverse_top_level’] = false;
}else{
$args[‘reverse_top_level’] = true;
}
return $args;
}
You can stop update specific plugin with below code.
function filter_plugin_updates( $value ) {
unset( $value->response[‘boopis-woocommerce-rfq/boopis-rfq.php’] );
unset( $value->response[‘tw-recent-posts-widget/tw-recent-posts-widget.php’] );
return $value;
}
add_filter( ‘site_transient_update_plugins’, ‘filter_plugin_updates’ );
https://wordpress.org/plugins/cf7-field-validation/
This plugin add custom validation messages to individual fields of your contact form 7. You will be able to add your custom error message for text, text area, email, url, radio, phone number etc fields in contact form 7.
Features of this plugin.
- Add Custom Validation Message to Contact Form Fields.
- Allows field to be validated for text, text area, email, url, radio, phone number and more.
- Error message for individual fields.
- You can add custom validation with multiple forms.
https://wordpress.org/plugins/accordion-faq-plugin/
This plugin provide FAQ’s as accordion type with shortcode tag in taxonony/category page,directly take shortcode put in any page,post and widget.
Features of this plugin. * Unlimited FAQs and Taxonomy/category * Responsive FAQs * Compatible with WordPress standard themes * Taxonomy/Categorized display of FAQS * Displaying question and answer based on accordion. * Unlimited Support for comments/Query.