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
| //* Add read more to customize -code by junior atoms | |
| add_action( 'customize_register', 'jr_register_read_more_customize' ); | |
| function jr_register_read_more_customize( $wp_customize ) { | |
| $wp_customize->add_section( | |
| 'jr_read_more_section', | |
| array( | |
| 'title' => 'Read More', | |
| 'priority' => 200 | |
| ) |
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
| ol.numbers { | |
| list-style-type: none !important; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| ol.numbers li { | |
| counter-increment: step-counter; | |
| font-size: 18px; | |
| list-style-type: none !important; | |
| margin: 0 0 12px; |
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
| h1.entry-title.above { | |
| text-align:center; | |
| background:#000000; | |
| color:#fff; | |
| padding: 15px 0; | |
| } |
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 | |
| // Retrieves the stored value from the database - put in hook box and choose hook location | |
| $meta_value = get_post_meta( get_the_ID(), '_my_meta_value_key', true ); | |
| // Checks and displays the retrieved value | |
| if( !empty( $meta_value ) ) { | |
| echo $meta_value; | |
| } | |
| ?> |
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
| //* Remove the header right widget area | |
| unregister_sidebar( 'header-right' ); |
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
| <Files xmlrpc.php> | |
| Order Deny,Allow | |
| Deny from all | |
| Allow from 192.0.64.0/18 | |
| Satisfy All | |
| ErrorDocument 403 http://127.0.0.1/ | |
| </Files> |
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
| add_shortcode('wp_caption', 'img_caption_add_description'); | |
| add_shortcode('caption', 'img_caption_add_description'); | |
| function img_caption_add_description($attr, $content = null) | |
| { | |
| $post_id = str_replace('attachment_', '', $attr['id']); | |
| $img = get_post((int)$post_id); | |
| if (is_a($img, 'WP_Post')) { | |
| $attr['caption'] = $img->post_content; | |
| } |
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
| /* this doesn't get processed early enough if created in hook boxes, so leave in custom functions */ | |
| add_action( 'pre_get_posts' , 'your_modify_search' ); | |
| function your_modify_search( $query ) { | |
| if ( ! $query->is_main_query() ) return; | |
| /* else is main query, so process search target */ | |
| if ( $query->is_search ) { | |
| $query->set( 'post_type' , 'post' ); /* search posts only, not pages or other */ | |
| /* test for search text stored in [s] set to a value, but empty */ | |
| if ( isset($_GET['s']) && empty($_GET['s']) ) $query->set( 's' , "[empty search text ]" ); /* sub in whatever empty text you want to use */ | |
| } |