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_filter('excerpt_length', 'my_excerpt_length'); | |
| function my_excerpt_length($length) { | |
| if(is_front_page()) { | |
| return 9; | |
| } else { | |
| return 40; | |
| } | |
| } |
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
| //https://www.wpexplorer.com/wordpress-button-shortcode/ | |
| //[button url="YOUR LINK" target="self" color="blue"]Button Text[/button] | |
| //[button url="YOUR LINK" target="self" text="Button Text"] | |
| function myprefix_button_shortcode( $atts, $content = null ) { | |
| // Extract shortcode attributes | |
| extract( shortcode_atts( array( | |
| 'url' => '', | |
| 'title' => '', | |
| 'target' => '', |
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()){wp_redirect( 'http://www.yourwebsite.com/_index.html' ); exit;}?> |