"Recent Posts" not showing custom post types

Community Forums Forums Design Tips and Tricks "Recent Posts" not showing custom post types

This topic is: not resolved

This topic contains 24 replies, has 3 voices, and was last updated by  styzer 3 months ago.

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • #112313

    styzer
    Participant
    Post count: 97

    Hi all, I’m trying to show recent posts on my home page (Outreach Pro) in the home-bottom widget section. But only the “posts” are showing, which are called “articles” in custom post designation. I tried many plugins as well but no joy.

    I have two options:

    1- find a solution to display a selection of posts, like a menu type but I choose the posts to show.

    2- Use the space under the home-bottom to show a few blog entries with excerpts.

    I need to display dynamic content on the home page, and this is what I believe would work best – show posts that my client can select herself, and display it with a feature image and excerpt.

    The site is here: http://thresholdpublications.com/ortzion3/ and we’re a few hours away from launching it.

    Thanks for any help!

    regards,

    Andre

    http://thresholdpublications.com/ortzion3/
    #112362

    braddalton
    Participant
    Post count: 9959
    #112462

    Kellylise
    Participant
    Post count: 418

    Here’s a Genesis-based, Featured CPT option:

    http://calliaweb.co.uk/featured-custom-post-type-widget-genesis/

    #112464

    Kellylise
    Participant
    Post count: 418

    For Custom Post Types, Ultimate Posts Widget does not filter by CPT taxonomy. Only post categories.

    #112467

    styzer
    Participant
    Post count: 97

    Hi Brad, Kellylise,

    I installed the plugin Kellylise suggested on a cloned location:

    http://creativeforge.org/ortzion-july/

    Still nothing showing. Let me show you the code for the newsletters custom post type, see if you notice anything wrong that would keep it from showing?

    
    // Register Custom Post Type
    function newsletter_post_type() {
    
    	$labels = array(
    		'name'                => _x( 'Newsletter Types', 'Post Type General Name', 'newsletters' ),
    		'singular_name'       => _x( 'Newsletter', 'Post Type Singular Name', 'newsletter' ),
    		'menu_name'           => __( 'Newsletters', 'newsletters' ),
    		'parent_item_colon'   => __( 'Parent Item:', 'newsletters' ),
    		'all_items'           => __( 'All Items', 'newsletters' ),
    		'view_item'           => __( 'View Item', 'newsletters' ),
    		'add_new_item'        => __( 'Add New Item', 'newsletters' ),
    		'add_new'             => __( 'Add New', 'newsletters' ),
    		'edit_item'           => __( 'Edit Item', 'newsletters' ),
    		'update_item'         => __( 'Update Item', 'newsletters' ),
    		'search_items'        => __( 'Search Item', 'newsletters' ),
    		'not_found'           => __( 'Not found', 'newsletters' ),
    		'not_found_in_trash'  => __( 'Not found in Trash', 'newsletters' ),
    	);
    	$args = array(
    		'label'               => __( 'newsletter_type', 'newsletters' ),
    		'description'         => __( 'Newsletter Type Description', 'newsletters' ),
    		'labels'              => $labels,
    		'supports'            => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ),
    		'taxonomies'          => array( 'category', 'post_tag' ),
    		'hierarchical'        => false,
    		'public'              => true,
    		'show_ui'             => true,
    		'show_in_menu'        => true,
    		'show_in_nav_menus'   => true,
    		'show_in_admin_bar'   => true,
    		'menu_position'       => 5,
    		'menu_icon'           => '',
    		'can_export'          => true,
    		'has_archive'         => true,
    		'exclude_from_search' => false,
    		'publicly_queryable'  => true,
    		'capability_type'     => 'page',
    	);
    	register_post_type( 'newsletter_type', $args );
    
    }
    
    // Hook into the 'init' action
    add_action( 'init', 'newsletter_post_type', 0 );

    Beyond that, my only thought would be that somehow my functions.php got something deleted that should usually show those custom posts in a widget. They show on the site, just not in a “featured” aspect. I thought maybe even using a hook to create a section underneath that home-bottom section, where I could have featured posts with excerpt,

    Thanks for all the help!

    Regards,

    Andre

    • This reply was modified 3 months ago by  styzer.
    • This reply was modified 3 months ago by  styzer.
    • This reply was modified 3 months ago by  styzer.
    • This reply was modified 3 months ago by  styzer.
    #112480

    Kellylise
    Participant
    Post count: 418

    Sorry – my skills are too limited to evaluate your code (or mine for that matter!).

    http://coolestguidesontheplanet.com/create-custom-post-types-in-genesis-child-theme-in-wordpress/

    Sometimes in Genesis you have to enable support for a specific custom post type and a plugin.

    http://ahjira.com/enable-genesis-simple-sidebars-plugin-for-custom-post-types/

    Example of enabling Product CPT support from Genesis Simple Sidebars:
    add_post_type_support( 'product', 'genesis-simple-sidebars' );

    #112483

    Kellylise
    Participant
    Post count: 418
    #112558

    braddalton
    Participant
    Post count: 9959

    Where did you get the code from?


    #112559

    styzer
    Participant
    Post count: 97

    Hi Brad,

    It’s from the functions.php file, where the custom-type posts were entered in.

    #112560

    braddalton
    Participant
    Post count: 9959

    Its not from a StudioPress child theme.


    #112565

    styzer
    Participant
    Post count: 97

    Yes, it is from the Outreach Pro theme, which I had modified to create custom types by a third-party.

    #112568

    braddalton
    Participant
    Post count: 9959

    The code for custom post types is not included in the Outreach Pro theme so its third party code which could be the reason its not working.

    I suggest you take the code from the Executive Pro theme and modify it for your CPT.


    #112570

    styzer
    Participant
    Post count: 97

    So are you saying that there is no way to have custom posts with Outreach Pro natively? I knew something wasn’t jiving… Gosh all this work… Thanks Brad, I’ll look into it…

    Regards,

    Andre

    #112575

    braddalton
    Participant
    Post count: 9959

    I’m saying to use the code from the Executive Pro theme rather than code from an external source.


    #112650

    styzer
    Participant
    Post count: 97

    Hi Brad,

    Well I’ve done so – I copy/paste the “create custom type” code from Executive Pro and now none of my content will show. All the links were changed following this. Menu became duplicated and I can’t make sense of it. So the whole things is messed up. I’m going to reinstall.

    Could you be more specific as to what code you see would work for this and how to avoid messing up all the links and menus by doing this? Where and how should I make the changes? As you may have guessed, this is beyond my head, so if you have step by step instructions that would help greatly!

    Regards,

    Andre

Viewing 15 posts - 1 through 15 (of 25 total)

You must be logged in to reply to this topic.