Last active
August 29, 2015 14:20
-
-
Save blickwert/78b92de582e6e3b42145 to your computer and use it in GitHub Desktop.
Wordpress Post settings
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
// 1.2 Default gallery link | |
add_shortcode( 'gallery', 'my_gallery_shortcode' ); | |
function my_gallery_shortcode( $atts ) { | |
$atts['link'] = 'file'; | |
return gallery_shortcode( $atts ); | |
} |
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
// 1.1 Default image link | |
function default_image_upload_settings() { | |
update_option('image_default_link_type', 'none' ); | |
update_option('image_default_size', 'large' ); | |
} add_action('after_setup_theme', 'default_image_upload_settings'); |
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
// 1.4 make links clickable | |
add_filter('the_content', 'make_clickable'); |
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
// 1.3 more link | |
add_filter( 'excerpt_more', 'new_excerpt_more' ); | |
function new_excerpt_more( $more ) { | |
return ' <a class="read-more" href="'. get_permalink( get_the_ID() ) . '">' . __('Read More', 'your-text-domain') . '</a>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment