Skip to content

Instantly share code, notes, and snippets.

@vadimsgr
vadimsgr / mywidget-basic.php
Created August 30, 2018 12:54 — forked from pommiegranit/mywidget-basic.php
Playing with WordPress widgets
<?php
/*
Plugin Name: My Widget
Plugin URI: http://mydomain.com
Description: My first widget
Author: Me
Version: 1.0
Author URI: http://mydomain.com
*/
@vadimsgr
vadimsgr / functions.php
Created January 9, 2018 14:21 — forked from corsonr/functions.php
Display WooCommerce product variations dropdown select on the shop page
<?php
// Display variations dropdowns on shop page for variable products
add_filter( 'woocommerce_loop_add_to_cart_link', 'woo_display_variation_dropdown_on_shop_page' );
function woo_display_variation_dropdown_on_shop_page() {
global $product;
if( $product->is_type( 'variable' )) {
@vadimsgr
vadimsgr / wc-pagination-functions.php
Last active September 8, 2015 11:47 — forked from klihelp/wc-pagination-functions.php
WooCommerce shortcode pagination on pages
<?php
/**
* This code shows pagination for WooCommerce shortcodes when it's embeded on single pages.
* Include into functions.php.
*/
if ( ! is_admin() ) {
// ---------------------- FRONTPAGE -------------------
if ( defined('WC_VERSION') ) {