Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26623

    I am currently using WCK Post type creator to create a new post type which has worked fine and I have added some additional custom fields in that post type.. however when I use the blogpost in the advanced layout and choose the relevant category that this would post to it is not picking the post up.. Do I need to add in a query to pick these up in the loop? and any ideas how I would do this?

    #131061

    I am aware I will need to enter the following:

    // Show posts of ‘post’, ‘page’ and ‘movie’ post types on home page

    add_action( ‘pre_get_posts’, ‘add_my_post_types_to_query’ );

    function add_my_post_types_to_query( $query ) {

    if ( is_home() && $query->is_main_query() )

    $query->set( ‘post_type’, array( ‘post’, ‘page’, ‘Open Match Results’ ) );

    return $query;

    }

    but not sure where this will need to go

    #131062

    Hi duttonstuart,

    That is a bit beyond what we can help with via support. Its definitely doable but has a very high margin for small errors which can cause things to not work or be a bit buggy.

    Nick did a video integrating the Advanced Layout Editor with custom post type here but the results are not supported as its beyond what Kriesi wrote support for https://vimeo.com/channels/aviathemes/64996057

    Regards,

    Devin

    #131063

    Hi.. I dont want to be able to use the advanced layout editor on custom posts… I dont really need that.. I just need to be able to ensure that the loop pulls through the new post type so it shows in the blog feed.. I think this is quite standard but just not sure how.. thought you guys may know as I know how good you all are.. :)

    #131064

    I didn’t test the code but you can try to insert it at the bottom of functions.php. It will only work if the blog is on the homepage though because the is_home() check will exclude all other pages.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Adding Custom Post type to Blog Post on Enfold’ is closed to new replies.