This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var slides = $('.slideshow .slides').children('.slide').length; //Change css selectors accordingly | |
| if(slides <= 1) { | |
| $('.slideshow .pager').hide(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if ( ! function_exists( 'unregister_post_type' ) ) : | |
| function unregister_post_type( $post_type ) { | |
| global $wp_post_types; | |
| if ( isset( $wp_post_types[ $post_type ] ) ) { | |
| unset( $wp_post_types[ $post_type ] ); | |
| return true; | |
| } | |
| return false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function get_taxonomy_tree($taxonomy, $parent=0){ | |
| $args = array( | |
| 'hide_empty'=>false, | |
| 'parent'=>$parent | |
| ); | |
| $terms = get_terms( $taxonomy, $args ); | |
| if($terms){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ALTER | |
| CREATE | |
| CREATE TEMPORARY TABLES | |
| DELETE | |
| DROP | |
| INDEX | |
| INSERT | |
| LOCK TABLES | |
| SELECT | |
| UPDATE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aspect ratio = width / height | |
| eg. 960 / 600 = 1.6:1 | |
| height = width / aspect ratio | |
| width = height * aspect ratio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In you PhpMyAdmin query for: (if you have a different database prefix, change that in the query, also change the user_id to yours) | |
| SELECT * | |
| FROM `wp_usermeta` | |
| WHERE `user_id` =1 | |
| AND `meta_key` LIKE 'meta-box%' | |
| Than delete those values and you will get the original order back. If you only want to change the menu order back for a page than only delete "meta-box-order_page". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @author Rob W <[email protected]> | |
| * @website http://stackoverflow.com/a/7513356/938089 | |
| * @version 20120724 | |
| * @description Executes function on a framed YouTube video (see website link) | |
| * For a full list of possible functions, see: | |
| * https://developers.google.com/youtube/js_api_reference | |
| * @param String frame_id The id of (the div containing) the frame | |
| * @param String func Desired function to call, eg. "playVideo" | |
| * (Function) Function to call when the player is ready. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery(document).ready(function($){ | |
| on_resize(function() { | |
| var w = $(window).width(); | |
| if(w>=740){ //740-x | |
| jQuery('.main-nav').show(); | |
| } else if (w<740){ //0-739 | |
| jQuery('.main-nav').hide(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* This code filters the Categories archive widget to include the post count inside the link */ | |
| add_filter('wp_list_categories', 'cat_count_span'); | |
| function cat_count_span($links) { | |
| $links = str_replace('</a> (', ' <span class="count">(', $links); | |
| $links = str_replace(')', ')</span></a>', $links); | |
| return $links; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| max_execution_time = 300 | |
| max_input_time = 300 | |
| max_input_vars = 2000 | |
| memory_limit = 256M |