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
<div class="placeholder"> | |
<div class="loader"> | |
<div class="loader1"></div> | |
<div class="loader2"></div> | |
<div class="loader3"></div> | |
</div> | |
</div> |
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
// Custom excerpt accepting html tags | |
function wpse_allowedtags() { | |
// Allow the following HTML tags: | |
return '<br>,<p>'; | |
} | |
if ( ! function_exists( 'wpse_custom_wp_trim_excerpt' ) ) : | |
function wpse_custom_wp_trim_excerpt($wpse_excerpt) { | |
$raw_excerpt = $wpse_excerpt; | |
if ( '' == $wpse_excerpt ) { |
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" /> |
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
<?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
$('[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
<!-- 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
<?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
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 | |
if( is_user_logged_in() ) { | |
$menu = 'Menu1'; | |
} else { | |
$menu = 'Menu2'; | |
} | |
wp_nav_menu( array( 'menu' => $menu, 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); | |
?> |