Skip to content

Instantly share code, notes, and snippets.

View kneupmedia's full-sized avatar

Kneup Media kneupmedia

View GitHub Profile
@kneupmedia
kneupmedia / sentry-docker-compose.yml
Created September 9, 2017 15:33
Sentry Docker Compose
version: '2'
services:
redis:
image: redis
postgres:
image: 'postgres'
environment:
POSTGRES_USER: postgres
@kneupmedia
kneupmedia / remove-cpt.php
Created November 18, 2017 13:03
Remove Custom Post Type - WordPress
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;
@kneupmedia
kneupmedia / add-custom-post-type-to-wordpress-feed
Created November 18, 2017 13:45
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-read-more-link-in-wordpress-feed
Created November 18, 2017 13:46
Remove "Read more" link from WordPress Feed