WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: WP-Facebook applications] Permalinks not working for custom post types when this plugin is

[Resolved] [Plugin: WP-Facebook applications] Permalinks not working for custom post types when this plugin is

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jeremy Herve
    Member

    @hd-j

    Could you give me more details about the theme you are using, so that I can try to reproduce and fix?

    Thanks!

    I am using Sidewinder theme by Graph Paper Press. It has Galleries custom post type and while other posts work, this post type shows 404 page when trying to access via link (other than default permalink). If you have any theme with custom post types, you might want to check. I am not sure if its a theme issue. If you know anything let me know.

    Plugin Author Jeremy Herve
    Member

    @hd-j

    Thanks for the details.

    I finally found the time to test my plugin along with other Custom Post Types. Unfortunately I could not reproduce your issue, other CPT seem to be displayed properly when using my plugin.

    You might want to turn to the Graph Paper Press team and ask them about it.

    Thanks for testing. Can you please let me know which theme you used?

    Plugin Author Jeremy Herve
    Member

    @hd-j

    I used a homemade plugin I quickly put together, and then a good CPT plugin from the repository: http://wordpress.org/extend/plugins/custom-post-type-ui/

    Plugins seems to work fine. It seems this is particular when CPT is used in a theme. I can’t find another theme with CPT but if you find any, please do test it. I used another custom post type code on a different theme and permalinks still show 404 for me.

    add_action( 'init', 'register_cpt_gallery' );
    
    function register_cpt_gallery() {
    
        $labels = array(
            'name' => _x( 'Galleries', 'gallery' ),
            'singular_name' => _x( 'Gallery', 'gallery' ),
            'add_new' => _x( 'Add New Gallery', 'gallery' ),
            'add_new_item' => _x( 'Add New Gallery', 'gallery' ),
            'edit_item' => _x( 'Edit Gallery', 'gallery' ),
            'new_item' => _x( 'New Gallery', 'gallery' ),
            'view_item' => _x( 'View Gallery', 'gallery' ),
            'search_items' => _x( 'Search Galleries', 'gallery' ),
            'not_found' => _x( 'No galleries found', 'gallery' ),
            'not_found_in_trash' => _x( 'No galleries found in Trash', 'gallery' ),
            'parent_item_colon' => _x( 'Parent Gallery:', 'gallery' ),
            'menu_name' => _x( 'Galleries', 'gallery' ),
        );
    
        $args = array(
            'labels' => $labels,
            'hierarchical' => false,
    
            'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'custom-fields', 'comments', 'revisions' ),
            'taxonomies' => array( 'category', 'post_tag', 'collections', 'gallery_tags' ),
            'public' => true,
            'show_ui' => true,
            'show_in_menu' => true,
    
            'show_in_nav_menus' => true,
            'publicly_queryable' => true,
            'exclude_from_search' => false,
            'has_archive' => true,
            'query_var' => true,
            'can_export' => true,
            'rewrite' => true,
            'capability_type' => 'post'
        );
    
        register_post_type( 'gallery', $args );
    }
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] [Plugin: WP-Facebook applications] Permalinks not working for custom post types when this plugin is’ is closed to new replies.