#wrapper>(header>figure#logo(a>img[src=logo.png])+(nav>ul>li*4>a))+(div[role=main]>header>h1)+footer
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
| sudo ln -sn /usr/bin/g++ /usr/bin/g++-4.2 | |
| sudo ln -sn /usr/bin/gcc /usr/bin/gcc-4.2 |
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 is_user_logged_in() { | |
| $loggedin = false; | |
| foreach ( (array) $_COOKIE as $cookie => $value ) { | |
| if ( stristr($cookie, 'wordpress_logged_in_') ) | |
| $loggedin = true; | |
| } | |
| return $loggedin; | |
| } | |
| if ( ! stristr($_SERVER['REQUEST_URI'], '/wp-admin') && ! stristr($_SERVER['REQUEST_URI'], '/wp-login.php') && ! is_user_logged_in() ) |
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
| // Put this in your functions.php file | |
| // Reduce nav classes, leaving only 'current-menu-item' | |
| function nav_class_filter( $var ) { | |
| return is_array($var) ? array_intersect($var, array('current-menu-item')) : ''; | |
| } | |
| add_filter('nav_menu_css_class', 'nav_class_filter', 100, 1); | |
| // Add page slug as nav IDs | |
| function nav_id_filter( $id, $item ) { |
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
| <p> | |
| Uw zoekopdracht ‘<strong><?php the_search_query(); ?></strong>’ | |
| gaf <em><?php | |
| /* Show number of search results */ | |
| $res = &new WP_Query("s=$s&showposts=-1"); | |
| echo $res->post_count; | |
| wp_reset_query(); | |
| ?> resultaten</em>. | |
| </p> |
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
| function my_restrict_manage_posts() { | |
| global $typenow; | |
| $args=array( 'public' => true, '_builtin' => false ); | |
| $post_types = get_post_types($args); | |
| if ( in_array($typenow, $post_types) ) { | |
| $filters = get_object_taxonomies($typenow); | |
| foreach ($filters as $tax_slug) { | |
| $tax_obj = get_taxonomy($tax_slug); | |
| wp_dropdown_categories(array( | |
| 'show_option_all' => __('Show All '.$tax_obj->label ), |
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
| // Put this code above the define('ABSPATH') line | |
| /** Run 2 copies of WordPress from the same Database | |
| * | |
| * source: http://codex.wordpress.org/Running_a_Development_Copy_of_WordPress#Run_2_Copies_of_WordPress_from_the_same_Database | |
| */ | |
| function WP_LOCATION () { | |
| $script_path = realpath(dirname($_SERVER['SCRIPT_FILENAME'])); | |
| $wp_base_path = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR); | |
| $web_subfolder = substr( $script_path, strlen($wp_base_path)); |
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
| // Put this in your functions.php file | |
| /** | |
| * Return simple markup for menu | |
| * | |
| * Returns: | |
| * - HTML unordered list | |
| * - Array with HTML links | |
| * | |
| * @param string $menuslug Menu slug, defined in WP |
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
| /* | |
| ---------------------------------------------------------------- | |
| Gravity Forms Front End Form Styles | |
| Version 1.6.5.1 | |
| http: //www.gravityforms.com | |
| updated: April 24, 2012 6:09 PM | |
| Gravity Forms is a Rocketgenius project | |
| copyright 2012 Rocketgenius Inc. |