Skip to content

Instantly share code, notes, and snippets.

@Yokann
Yokann / wp-query-ref.php
Created March 25, 2016 16:07 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?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(
@Yokann
Yokann / functions.php
Last active October 12, 2022 04:25
Add font size button into Wordpress TinyMCE
function wp_editor_fontsize_filter( $buttons ) {
array_shift( $buttons );
array_unshift( $buttons, 'fontsizeselect');
array_unshift( $buttons, 'formatselect');
return $buttons;
}
add_filter('mce_buttons_2', 'wp_editor_fontsize_filter');
// Customize mce editor font sizes
@Yokann
Yokann / move_wordpress_domain.sql
Last active August 29, 2015 14:17
Move Wordpress to a new domain
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-site.com', 'http://www.new-site.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-site.com','http://www.new-site.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-site.com', 'http://www.new-site.com');