WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
[resolved] Can't see custom posts (6 posts)

  1. MCosmin
    Member
    Posted 1 year ago #

    Hi,

    I created some custom posts with this plugin and I added Categories as a taxonomiy that will be used with this post type.

    When I enter in the categories I can't see my articles from custom posts.I can see only normal posts. Any idea how to solve this?

    http://wordpress.org/extend/plugins/types/

  2. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Dear MCosmin,

    Please send me some screenshot to my mail --> bigul.m@wpml.org for better understanding.

    Hope you are using latest version of WordPress and Types. Please let me know your theme and other plug-ins you were using.

    [ Signature moderated. ]

  3. MCosmin
    Member
    Posted 1 year ago #

    Thank you. I sent you an email with more details.

    So on my home page or categories pages I can't see custom posts, only original posts. I Don't know what to do to see custom posts in my website.

  4. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Dear MCosmin,

    Please check this link. Hope it will work.

    http://codex.wordpress.org/Post_Types#Custom_Post_Types_in_the_Main_Query

    [ Signature moderated. ]

  5. MCosmin
    Member
    Posted 1 year ago #

    Thanks mbigul. This function works:

    // 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', 'movie' ) );
    	return $query;
    }

    Thank you a lot!

  6. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Nice to hear that.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.