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 | |
// Register wp_nav_menu() = add menu option in Appearance WordPress Admin Menu | |
register_nav_menu( 'primary', __( 'Primary Menu', 'fablabtheme' ) ); | |
?> |
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
// Register custom background = add background option in Appearance WordPress Admin Menu | |
add_theme_support( 'custom-background', array( | |
'default-color' => 'e6e6e6', | |
) ); |
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( is_user_logged_in() ) { | |
$menu = 'Menu1'; | |
} else { | |
$menu = 'Menu2'; | |
} | |
wp_nav_menu( array( 'menu' => $menu, 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); | |
?> |
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
if(is_user_logged_in()) { | |
add_filter('show_admin_bar', '__return_true', 1000); | |
} |
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 | |
// Create custom press posts | |
add_action( 'init', 'create_posttype' ); | |
add_theme_support('post-thumbnails'); | |
add_post_type_support( 'press', 'thumbnail' ); // Add Featured Image for Press Posts | |
function create_posttype() { | |
register_post_type( 'press', | |
array( | |
'labels' => array( | |
'name' => __( 'Press' ), |
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
<!-- Auto reload the page every 30s --> | |
function pageRefresh(refreshTime) { | |
setTimeout("location.reload(true);",refreshTime); | |
} | |
window.onload = pageRefresh(30000); |
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
$('[id]').each(function (i) { | |
$('[id="' + this.id + '"]').slice(1).remove(); | |
}); |
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 | |
/* | |
Plugin Name: Custom Text Widget | |
Plugin URI: https://gist.github.com/jimmy89Li | |
Description: Custom Text Widget with an Image from url, Title and Content | |
Author: jimmyLi | |
Version: 1.0.0 | |
Author URI: https://liviusimion.com | |
*/ | |
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
@import url(//fonts.googleapis.com/css?family=Open+Sans); | |
body {font-family: 'Open Sans', sans-serif; font-size:1em; line-height:1.5em;} |
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
<link rel="shortcut icon" href="<?php wp_site_icon(); ?>" /> | |
<link rel="shortcut icon" href="<?php bloginfo('template_url'); ?>/favicon.ico" /> |