John Havlik
Forum Replies Created
-
Forum: Plugins
In reply to: [Breadcrumb NavXT] make menu parent not selectableIf you want to keep the resource in the breadcrumb trail, but just not have it linked, you can use the
bcn_breadcrumb_linkedfilter. Using the passed in parameters to determine if the breadcrumb is for a resource you wish to not link, and returning false if you wish for the breadcrumb to be unlinked. The following article provides an example of how to do this: https://mtekk.us/archives/guides/remove-the-link-in-a-breadcrumb/If you want to remove the resource from the breadcrumb trail, you will want to use the
bcn_after_fillaction, iterating over the passed in bcn_breadcrumb_trail object’s breadcrumbs array searching for the breadcrumb you want to remove, and removing it from the breadcrumbs array.Just a heads up, while WordPress doesn’t natively support term parent relationships outside of the same taxonomy in the editor, the WordPress backend supports it. You should just have to provide your own GUI element and code to set the parent term as desired (there are probably plugins that let you do this, but I’m not familiar with any).
@improvedline Yeah, the
bcn_template_tagsfilter isn’t what you want. In fact, using ACF may not be the correct way of doing this as well (unless it lets you set the term parent for a term to be of any term, of any taxonomy). Since 7.0, Breadcrumb NavXT supports type juggling for taxonomy terms, so you can just set the term_parent property for the term and Breadcrumb NavXT should follow it (setting Category A as the parent of Tag A.1 and Tag A.2 it should ‘just work’ if the tag taxonomy is set as the hierarchy for the post type in the Breadcrumb NavXT settings page). You just have to establish that term parent hierarchy.Forum: Plugins
In reply to: [Breadcrumb NavXT] Separator NOT changingHmm, can you post the markup for the breadcrumb trail you are seeing (post to something like gist or pastebin)? Since it doesn’t sound like the two possibilities I thought of earlier is causing this, it would be helpful to see what markup (HTML) Breadcrumb NavXT is generating.
Forum: Plugins
In reply to: [Breadcrumb NavXT] Separator NOT changingI can think of two thing that could result in this behavior.
The first is when you go to change the separator, the setting isn’t getting saved for some reason. If you open the Breadcrumb NavXT settings page in a new browser window or tab, if the setting is still at the default value, the it is likely the setting didn’t save (after pressing the “Save Changes” button at the bottom of the screen you may have seen a message at the top of the screen claiming some changes weren’t saved).
The second, and the more likely cause, is the breadcrumb trail you are seeing isn’t actually being generated by Breadcrumb NavXT (or is being called in a way that does not support using the settings from the settings page). Examining the generated markup should show a particular pattern if Breadcrumb NavXT is actually generating the trail (you should see the result of the breadcrumb templates in the settings page).
Forum: Reviews
In reply to: [Breadcrumb NavXT] Need common template for all post types.Regarding a common template for all the post types, that’s something that could be considered in the future if there was to be a change to a Basic/Advanced mode in the settings page (rather than the General/Posts/Taxonomies/Miscellaneous split currently seen).
There is a settings importer and exporter (has existed for many years now), in the most recent release, the settings importer/exporter was revamped to use a JSON format instead of the legacy XML format that was used in the past. You can find the settings importer and exporter in the help drop down menu in the Breadcrumb NavXT settings page.
So, there are a couple of ways you could do this, depending on what sort of interface you want. If you want to just add something in front of the title text, then the
bcn_breadcrumb_titlefilter can be used and you can add something in front of the title as needed. The other option is creating a custom breadcrumb template tag using thebcn_template_tagsfilter and then you can place that tag in your breadcrumb templates where ever you want the extra text to show up.Forum: Plugins
In reply to: [Breadcrumb NavXT] Hide Parent CategoryTypically, if you need a hidden category, you typically should be using custom taxonomies for each of the major ‘category’ branches (i.e. have Brands as a custom taxonomy and Agripp as a term that is of the Brands taxonomy). That said, you can remove a breadcrumb from the trail by using the
bcn_after_fillaction and looping through the passed in breadcrumb array looking for the breadcrumb for the category in question and then removing it from the array. If you don’t want to write any code, there is a premium extension for Breadcrumb NavXT that provides a way to do this without writing any code.Forum: Plugins
In reply to: [Breadcrumb NavXT] Too many Notices on the front-end in version 6.0.1What version of Breadcrumb NavXT are you using, and what version of WordPress did you upgrade from?
Assuming you’re using Breadcrumb NavXT 7.x (7.0.x or 7.1), it looks like you have a custom post type that isn’t registered properly (missing the name property, and several of the labels properties). As to why this is the case, and why moving the WordPress 6.0.1 presented the issue, I’m not exactly sure. I’m going to add checks in this code for the next release (tracking via the following GitHub issue https://github.com/mtekk/Breadcrumb-NavXT/issues/280). That said, it sounds like something else (assuming this is a custom post type causing it) is not obeying the WP API for post types, so you may have to do some troubleshooting to figure out what post type is causing the root problem (invalid entries in the
wp_post_typesglobal array, if you do avar_dumpon that global and link to the output (since posting it directly in this thread will get messy) I can help identify what entries may be causing the issue).Forum: Plugins
In reply to: [Breadcrumb NavXT] incomplete pathBased on your response, I’m guessing you are using the WordPress menu builder to set up the menu structure you listed. Since the menu structure does not have to reflect the actual content location/structure/hierarchy, Breadcrumb NavXT isn’t going to ‘just work’ in this case without either establishing the content relationships within WordPress (setting parents for pages/hierarchical post types and categories/hierarchical taxonomies) or using extra code to tell Breadcrumb NavXT to follow the menu (there is an extension to Breadcrumb NavXT that provides this functionality). As to exactly what has to be done to establish the relationship depends on what countries, regions. cities, streets, north, west, south, and east are relating to content types within WordPress (are they pages, are they categories, are they terms of a custom taxonomy, are they something else).
Forum: Plugins
In reply to: [Breadcrumb NavXT] Prepend custom linkThis is possible. You just need to hook into the
bcn_after_fillaction and add the breadcrumb in. The following article provides an example of how to do this: https://mtekk.us/archives/guides/add-a-static-breadcrumb-to-the-breadcrumb-trail/Forum: Plugins
In reply to: [Breadcrumb NavXT] Warnings …I assume you’ve upgraded from a pre-7.0 version to 7.1 (or 7.0.x), this notification is letting you know there were setting entries in the settings saved to the database which are for custom post types that are no longer showing up (or are not registered by the 9000 level of the
initaction). Once you make changes to your settings and press the “save settings” button, this message should go away.Forum: Plugins
In reply to: [Breadcrumb NavXT] Name from parent category and child categoryThe desired breadcrumb trail result isn’t possible to achieve via the breadcrumb templates with the out of the box breadcrumb template tags. You could add a custom template tag to achieve this, but there are other and better ways by hooking into the
bcn_breadcrumb_titlefilter. That said, the proposed breadcrumb structure doesn’t really the follow the rules of having a hierarchy (the current item should not be a combination of a child and parent, for terms the parent already has all of the child term’s posts in it in addition to all of the posts that are explicitly in the parent term).Forum: Plugins
In reply to: [Breadcrumb NavXT] Fatal error while importing or exporting settingsYep, this has been fixed in the development branch for Breadcrumb NavXT 7.1. The intent is to release 7.1 within the next week.
Forum: Plugins
In reply to: [Breadcrumb NavXT] incomplete path@wortpressender38 For the expected ‘Home > countries > regions > cities > streets’, what is streets, cities, regions, and countries. Are these all terms within a hierarchical taxonomy? Are these posts of a hierarchical post type? Are they something else (is it a mix of a post and terms)? If these are all terms or posts, you must establish the parent -> child relationship within the posts/terms for Breadcrumb NavXT to know there is a hierarchy to follow (please note that establishing a hierarchy in a menu does not actually result in your content being organized that way).
If it is a mix of posts and terms, at the point that it switches from posts to terms, that post must be a member of the desired term (set in the post editor). Also, you may need to tell Breadcrumb NavXT to use the taxonomy type that the term is a member of for the post hierarchy for the post type that post is an instance of (this is set in the Breadcrumb NavXT settings page).