Skip to content

Instantly share code, notes, and snippets.

@bewho
bewho / gist:370f2e1bf2fb84e8bddfd49899b77fd1
Created January 21, 2019 13:13 — forked from johnnyicarus/gist:9643945
Remove WPML Generator Tag
/**
* Remove <meta name="generator"> tag created by the WPML PLugin.
* Wrapped in an if-statement that checks for an instance of the
* sitepress-class (made global by WPML)
*
* @url http://wordpress.stackexchange.com/questions/117469/how-to-remove-wpml-generator-meta-tag-by-themes-functions-php-override-plugin
*
* @uses add_action
* @uses remove_action
* @uses current_filter
@bewho
bewho / 1140px-grid.css
Created January 2, 2019 10:44 — forked from gregrickaby/1140px-grid.css
Responsive Grid with Gutters - Example Markup
/* Grid
12 column - http://responsive.gs
--------------------------------------------- */
.row {
padding-bottom: 0;
}
.col {
float: left;
width: 100%;
/**
* Be sure to include library scripts in this order. Can be placed either
* in the header or footer.
*/
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-infinitescroll/2.0b2.120519/jquery.infinitescroll.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/masonry/3.1.2/masonry.pkgd.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/3.0.4/jquery.imagesloaded.min.js"></script>
@bewho
bewho / recent-post-with-images.php
Created January 2, 2019 10:42 — forked from gregrickaby/recent-post-with-images.php
Recent Posts with Images
<?php
/*
Plugin Name: Recent Posts with Images
Plugin URI: http://webdevstudios.com
Description: Display recent posts with images filterable by category or post type in a widget area.
Version: 1.0.0
Author: WebDevStudios
Author URI: http://webdevstudios.com
License: GPLv2
Text Domain: textdomain
@bewho
bewho / wp-config.php
Created January 2, 2019 10:41 — forked from gregrickaby/wp-config.php
WP DEBUG
<?php // do not include leading php tag
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', true);
<?php
/**
* Set Yoast SEO metabox priority to low.
*/
function wds_client_move_yoastseo_metabox() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'wds_client_move_yoastseo_metabox' );
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php
/**
* Remove all WooCommerce scripts and styles! Forever!
*
* @author WP Smith
* @since 1.0.0
*/
function grd_remove_woocommerce_styles_scripts() {
@bewho
bewho / remove-woocommerce-styles-scripts.php
Created January 2, 2019 10:38 — forked from gregrickaby/remove-woocommerce-styles-scripts.php
Remove WooCommerce styles and scripts.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php
/**
* Manage WooCommerce styles and scripts.
*/
function grd_woocommerce_script_cleaner() {
// Remove the generator tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@bewho
bewho / functions.php
Created December 20, 2018 09:58 — forked from fernandiez/functions.php
Shortcode Placeholder Image dummyimage_shortcode_function
// Añadir Shortcode
function dummyimage_shortcode_function( $atts ) {
// Atributos
$atts = shortcode_atts(
array(
'width' => '600',
'height' => '300',
'background' => 'eeeeee',
'text' => 'ffffff',
@bewho
bewho / functions.php
Created December 20, 2018 09:58 — forked from sebastienserre/functions.php
Snippet for WP functions.php
<?php
// add a favicon
function favicon_link() {
echo '<link rel="shortcut icon" type="image/x-icon" href="http://www.thivinfo.com/wp-content/themes/thivinfo_v3/favicon.ico" />' . "\n";
}
add_action( 'wp_head', 'favicon_link' );