This file contains 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
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); | |
function theme_enqueue_styles() { | |
wp_enqueue_style( 'divi', get_template_directory_uri() . '/style.css' ); | |
//wp_enqueue_script( 'divi', plugin_dir_url( __FILE__ ) . 'js/scripts.js', array( 'jquery', 'divi-custom-script' ), '0.1.2', true ); | |
wp_enqueue_script( 'app', get_bloginfo( 'stylesheet_directory' ) . '/js/scripts.js', array( 'jquery' ), '1.0.0' ); | |
wp_enqueue_style( 'normalize', get_bloginfo( 'stylesheet_directory' ) . '/css/normalize.css'); | |
wp_enqueue_style( 'font', get_bloginfo( 'stylesheet_directory' ) . '/css/typography.css'); | |
} | |
// For Divi Child Theme (Can be used with other themes) |
This file contains 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
ul#top-menu li:nth-child(1) a:after { | |
font-family: FontAwesome; | |
font-weight: normal; | |
font-style: normal; | |
display: inline-block !important; | |
text-decoration: inherit !important; | |
content: '\f095'; | |
color: #F4F41F !important; | |
padding-right: 5px; | |
} |
This file contains 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 wpb_autolink_featured_images( $html, $post_id, $post_image_id ) { | |
If (! is_singular()) { | |
$html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_the_title( $post_id ) ) . '">' . $html . '</a>'; | |
return $html; | |
} else { |
This file contains 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 | |
add_filter('xmlrpc_enabled', '__return_false'); | |
?> |
This file contains 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_bio_section{ | |
background: none repeat scroll 0 0 #F5F5F5; | |
padding: 15px; | |
border: 1px solid #ccc; | |
} | |
.author_name{ | |
font-size:16px; | |
font-weight: bold; | |
} |
This file contains 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 wpb_imagelink_setup() { | |
$image_set = get_option( 'image_default_link_type' ); | |
if ($image_set !== 'none') { | |
update_option('image_default_link_type', 'none'); | |
} | |
} | |
add_action('admin_init', 'wpb_imagelink_setup', 10); |
This file contains 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 my_myme_types($mime_types){ | |
$mime_types['svg'] = 'image/svg+xml'; //Adding svg extension | |
$mime_types['psd'] = 'image/vnd.adobe.photoshop'; //Adding photoshop files | |
return $mime_types; | |
} | |
add_filter('upload_mimes', 'my_myme_types', 1, 1); | |
?> |
This file contains 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
.even { | |
background:#f0f8ff; | |
} | |
.odd { | |
background:#f4f4fb; | |
} |
This file contains 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 | |
// Enable shortcodes in text widgets | |
add_filter('widget_text','do_shortcode'); | |
?> |
This file contains 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 exclude_category($query) { | |
if ( $query->is_feed ) { | |
$query->set('cat', '-5, -2, -3'); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts', 'exclude_category'); |
NewerOlder