Skip to content

Instantly share code, notes, and snippets.

Avatar

Kneup Media kneupmedia

View GitHub Profile
@kneupmedia
kneupmedia / remove-read-more-link-in-wordpress-feed
Created Nov 18, 2017
Remove "Read more" link from WordPress Feed
View remove-read-more-link-in-wordpress-feed
@kneupmedia
kneupmedia / add-custom-post-type-to-wordpress-feed
Created Nov 18, 2017
Add Custom Post Type to WordPress Feed
View add-custom-post-type-to-wordpress-feed
add_filter('pre_get_posts', 'add_cpt_to_main_feed');
function add_cpt_to_main_feed($query){
if ( $query->is_feed() ){
$query->set( 'post_type', array('post', 'my_custom_post_type') );
}
return $query;
@kneupmedia
kneupmedia / remove-cpt.php
Created Nov 18, 2017
Remove Custom Post Type - WordPress
View remove-cpt.php
if ( ! function_exists( 'unregister_post_type' ) ) :
function unregister_post_type() {
global $wp_post_types;
if ( isset( $wp_post_types[ 'post_type_name' ] ) ) {
unset( $wp_post_types[ 'post_type_name' ] );
return true;
}
return false;
}
endif;
View sentry-docker-compose.yml
version: '2'
services:
redis:
image: redis
postgres:
image: 'postgres'
environment:
POSTGRES_USER: postgres