WP-Facebook applications
[resolved] Permalinks not working for custom post types when this plugin is (7 posts)

  1. Chandra M
    Posted 4 years ago #

    I have a theme which uses custom post type. When I activate this plugin, other permalinks for posts/pages seems to work fine but it somehow conflicts with the custom post type. It shows 404 error. What could be the reason?


  2. Jeremy Herve
    Plugin Author

    Posted 4 years ago #

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


  3. Chandra M
    Posted 4 years ago #

    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.

  4. Jeremy Herve
    Plugin Author

    Posted 4 years ago #

    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.

  5. Chandra M
    Posted 4 years ago #

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

  6. Jeremy Herve
    Plugin Author

    Posted 4 years ago #

    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/

  7. Chandra M
    Posted 4 years ago #

    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 );

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Facebook applications
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic