Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
<?php
/*
Plugin Name: woocommerce modal variationn
Plugin URI: #
Description: show modal window with product variations after clicking -add to cart-.
Version: 0.1
Author: Maks Buriy
Author URI: mailto:[email protected]
License: GPL2
*/
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
<?php
// This code was used to generate a menu showing all blogs on a WordPress
// Multisite installation.
// projects_menu() was used in the template to show a dropdown menu on all the
// sites.
// The shortcode [bloglist] was used in the homepage of the main blog to link to
// all the other blogs.
/*PUT THIS IN YOUR CHILD THEME FUNCTIONS FILE*/
/*STEP 1 - REMOVE ADD TO CART BUTTON ON PRODUCT ARCHIVE (SHOP) */
function remove_loop_button(){
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
}
add_action('init','remove_loop_button');
<nav id="site-navigation" class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"><?php bloginfo( 'name' ); ?></a>
<h1><a href="//developer.mozilla.org/en-US/docs/Web/CSS/object-fit">object-fit</a></h1>
<h2>(original image)</h2>
<img src="//goo.gl/njQhWF" alt="Pier">
<h2>fill</h2>
<img class="object-fit_fill" src="//goo.gl/njQhWF" alt="Pier">
<h2>contain</h2>
<img class="object-fit_contain" src="//goo.gl/njQhWF" alt="Pier">
1) Install MAMP normally
2) Download the latest binary of tomcat from http://tomcat.apache.org/ and extract it into the MAMP folder
(you should now have a /Applications/MAMP/apache-tomcat-version folder)
3) Create a link to the apache-tomcat folder:
ln -s /Applications/apache-tomcat-7.0.37/ tomcat
4) Make sure all the binaries are executable:
cd /Applications/tomcat/bin