• Resolved Lox

    (@dreadlox)


    Hello,

    I was looking forward custom postype support but 3.6 doesn’t follow the rewrite slug I define.

    Custom post type are not always blog posts, I personnaly use custom post types as pages. I often redifine the rewrite slug and remove the front blog prefix. Example, for a school posttype I set

    Rewrite Slug: informations/schools (information and schoold are exiting pages. Doing this way a my_school school url would look like this:

    informations/schools/my_school

    But the breadcrumb shows:

    Home > Blog > my_school

    Whereas it should display:

    Home > Informations > Schools > my_school

    So here are my questions: is that behavior possible to achieve in in 3.6?

    If not, is it planned?

    Best regards

Viewing 15 replies - 31 through 45 (of 55 total)
  • Plugin Author John Havlik

    (@mtekk)

    pokes,

    Are you using a static front page? If not, the version that was in the SVN Trunk won’t work for you. I’ve updated the SVN Trunk and it should work now, but needs further testing. Note that archives will not obey the post root.

    Yes, working now! Not for archives as you say. Much appreciated. This is great for making non-hierarchical Custom Posts sit under a root Page.

    Sadly still not quite what I’m after, I think I need a way to specify a parent Page for each non-hierarchical Custom Post (any clues appreciated). If possible, would that work like this at present in NavXT?

    Home > Parent Page Hierarchy > Parent Page > Custom Post

    Alternatively, is there a way in NavXT to display the breadcrumbs for a different post/page?

    Plugin Author John Havlik

    (@mtekk)

    pokes,

    Well, to do that for each post you don’t need this new feature. You need to set the hierarchy type to “Page” and then you will need to somehow specify the post_parent property of every post that will need a page hiearchy. WordPress, by default, does not natively support this. I know others are doing this, but I don’t know how (if I can find the time I could probably write a plugin to make it easy to do).

    mtekk sorry if I’ve hijacked this thread a little, I can see now it wasn’t what I needed. I figured out late last night what you’ve just explained when I was reading your comments elsewhere from a few months back about writing a helper plugin.

    I’m no coder but I’ve managed to add a custom field to my custom posts where I specify the id of the page I want as parent, then I use this to create a breadcrumb trail. Being able to set a post_parent would be the ideal, not sure of the consequences of having that for a non-hierarchical post type. If you write that helper plugin I’d be very grateful, and I know others would be from what I’ve been reading elsewhere. Of course if you set the post to hierarchical you even get the Attributes dropdown to set a parent, it just needs to be populated with Pages instead of posts of the same type… this is what I may hack at next:-)

    Thread Starter Lox

    (@dreadlox)

    Hello Mtekk,

    Nice work on that “root page” setting for custom post type it works nicely. A couple of questions:

    • Can’t it be automated reading the rewrite_path custom post setting? Like a check box to activate that root page autodetection.
    • Can the root page be set by script? A function like bcn_set_rootpage($post_type, $root_page_id) ?

    Cheers.

    Plugin Author John Havlik

    (@mtekk)

    DreadLox,

    When I resume active development of Breadcrumb NavXT at the end of the month (I’m taking October “off” to work on my WordCamp MSP presentation) I’ll look into these. I see how a developer side solution can be beneficial.

    Thread Starter Lox

    (@dreadlox)

    Mtekk,

    I have found a bug. I have a products post_type. When I display a single post, it is ok I have Home > Product_category > Product_name.

    When it comes to display a porduct_category archive (loop) I get:
    Home > Blog_page_name > Product_category instead of simply Home > Product_category

    Regards

    Plugin Author John Havlik

    (@mtekk)

    DreadLox,

    Yes, archives are not supported by the root page setting, *yet*. I need to look into a way of assigning a taxonomy with a post type that doesn’t clutter the settings up (look like I can do it automatically). This weekend I plan on starting to work on Breadcrumb NavXT again.

    Plugin Author John Havlik

    (@mtekk)

    Ok, in the SVN trunk it should support archives for taxonomies now. It works by grabbing the first registered type for a taxonomy and using it’s root page. So, it multiple types are supported by a taxonomy, only the fist will be used for the root.

    Anonymous User 7341632

    (@anonymized-7341632)

    I have a related problem. I would like to have Home > Post-Type archive > Post
    I have the post-type archives set up with the excellent Custom Post Type Archives plugin but Breadcrumb-NavXT doesn’t put the post type as parent of the post.
    At the moment it only supporst Home > Post, even with the latest development version. Is it going to be supported?

    Plugin Author John Havlik

    (@mtekk)

    I do not know how the Custom Post Type Archives plugin does things, but some of it’s functionality will be built into WordPress 3.1 in regards to archives showing custom post types.

    What is “Post-Type archive”? Is it a page? A taxonomy type? If it is a taxonomy, and you have a non hierarchal post type, then you must tell Breadcrumb NavXT what hierarchy you want to use. If it is a Page, you need to set it as the “root” for the post types in question. Since this is not really built into WordPress, it will not just work automatically (can’t read minds, yet).

    Anonymous User 7341632

    (@anonymized-7341632)

    WordPress 3.1 Introduces Custom Post Type Archives
    That plugin works the same way. Basically it’s a list of posts of that type, that calls archive-{$post_type}.php and it falls back to archive.php

    So on the Aerosmith’s website we’d have this structure
    Home > Albums > Big Ones = a post of custom post-type “Album”
    Home > Albums = a list of all Aerosmith’s albums

    Anonymous User 7341632

    (@anonymized-7341632)

    I suggest “custom breadcrumbs”, they would be the best way to go around these kind of problems, as a catch-all solution.
    This feature would let the WP admin choose the breadcrumb format completely, based on the type of the page/post/category.
    Let’s say a user wants to display these formats:

    1. Blog > 2010 > November > How to use WordPress for posts
    2. Blog > Contacts for pages
    3. Blog > Tips > Using breadcrumbs for posts of type “Tips”

    then he’d have to use these strings as custom formats for each condition

    1. [year],[month]
    2. -nothing-
    3. [posttype]

    I’m going to try implementing this myself, but I can’t promise anything.

    Plugin Author John Havlik

    (@mtekk)

    I don’t think “custom breadcrumbs” would alleviate the situation. Actually, all they would be is a different way of setting the currently available settings.

    The problem here is that WordPress does not have a “posts page” for every post type. So I added the “post type root” option. This does part of the job, leaving the user to get the archive to work on that page. What I really need to do is to split that little part off in a separate plugin and do the little bit of archive work in that plugin.

    Anonymous User 7341632

    (@anonymized-7341632)

    When did you added that option? You mean using a “Page” as post type root?

Viewing 15 replies - 31 through 45 (of 55 total)
  • The topic ‘[Plugin: Breadcrumb NavXT] Custom post type support’ is closed to new replies.