Forum Replies Created
Viewing 7 posts - 1 through 7 (of 7 total)
-
AuthorPosts
-
jholcombkwMember
Site is off maintenance mode Thanks
jholcombkwMemberIs there away to filter out only Category you want? Category id = 1 than pull to homepage?
jholcombkwMemberThe CPT is events and it pull it. Where should I add the code?
jholcombkwMemberI add it to the bottom of my home.php and then tried it at the bottom of my functions.php. Yes I changed
add_action( 'pre_get_posts', 'wpsites_add_custom_post_types_to_loop' ); function wpsites_add_custom_post_types_to_loop( $query ) { if ( is_home() && $query->is_main_query() && !is_admin() ) { $query->set( 'post_type', array( 'post', 'your-cpt' ) ); return $query; } }
To
add_action( 'pre_get_posts', 'wpsites_add_custom_post_types_to_loop' ); function wpsites_add_custom_post_types_to_loop( $query ) { if ( is_home() && $query->is_main_query() && !is_admin() ) { $query->set( 'post_type', array( 'post', 'events' ) ); return $query; } }
jholcombkwMemberI tried the code, but nothing worked.
jholcombkwMemberI am using the Plugin called Events Manager, which generates the CPT.
jholcombkwMemberI was able to get it to work by changing the order.
.genesis-nav-menu {
clear: both;
font-size: 14px;
font-weight: bold;
line-height: 1.5;
width: 100%;
border-top: 3px solid #1E7EB7;
border-bottom: 3px solid #1E7EB7; -
AuthorPosts
Viewing 7 posts - 1 through 7 (of 7 total)