![]() |
I am using a paid theme (TrueThemes Sterling) and a 3rd party plugin (MusoPress Discography). The plugin uses custom post types which work as expected in other themes that I've tried, but in this particular theme, the discography breadcrumb and posts appear as if they're part of the blog, not part of the plugin's structure.
I'm not a developer, but I am hoping that I can at least get some idea of where to start looking for a solution. The plugin developer feels that the theme probably has breadcrumb code that does not work well with custom posts. The theme vendor does not support this kind of 'customization'.
http://www.scholamagdalena.ca/wp/discography/
Note when you click on an album it should show Recordings > Title in the breadcrumb. Instead it shows the blog path. Also note that both the recordings nav and updates (blog) nav are in their selected state.
Update:
The plugin vendor also noted the following:
It seems wordpress is interpreting the "single album" as a "single post", which shouldn't be happening. Maybe there's a custom function in the theme which is causing this to happen?
So this is probably a 2-parter:
Part 1: replace the breadcrumb
Part 2: figure out why the post is being displayed using the wrong template/page type.
Solution - 1can you show me the function from your theme which is producing breadcrumb? BTW where is album link? Solution - 2Hi. It's possible to disable the theme breadcrumbs from theme options page? If yes then maybe you can use a plugin to generate working breadcrumbs, or try breadcrumbs built in the famous WordPress SEO by Yoast plugin, or the Breadcrumb NavXT plugin. [[LINK href="http://wordpress.org/extend/plugins/wordpress-seo/"]]http://wordpress.org/extend/plugins/wordpress-seo/[[/LINK]] [[LINK href="http://wordpress.org/extend/plugins/breadcrumb-navxt/"]]http://wordpress.org/extend/plugins/breadcrumb-navxt/[[/LINK]] Good luck. Solution - 3It's tricky trying to get a theme and a plugin - neither of which know anything about the other - to work together. I've not seen the Sterling code, but there are clues as to what's wrong in the plugin code. This is one from line 274 of the plugin: So if the theme has a page.php, that's what will be used. Without it, then the ultra-default index.php will be used. I suspect that's what's happening, but you could check in your theme folder to see if a file called page.php exists. The next clue comes from line 82: So that first piece of code can be sidestepped by creating a file (in the theme folder) called single-muso-album.php. Have you tried that? If not, that's what you should do. Copy the contents of index.php (or page.php if that exists) into this new file. Then delete the breadcrumb code and stick something obvious like '@@@@@@@@@@@@@@' in it's place. When you view the page again do you see the @@@@@? If so, you're almost there. You just need some slightly tweaked breadcrumb code to display exactly as you want in place of your temporary marker. But get to that point first and let me know. Solution - 4The following plugin allows custom post types in breadcrumbs and is free. http://mtekk.us/code/breadcrumb-navxt/ Yoas breadcrumbs also allows custom post types. http://wordpress.org/extend/plugins/breadcrumbs/ Make sure you have this in your custom post function for yoast: 'has_archive' => true, Once you have that in place, the Yoast SEO plugin will let you select the custom post type as the parent page. Solution - 5In my opinion, problem is not caused by the plugin at all. Your theme does not recognize custom post type and incorrectly handle its breadcrumbs, heading and description. I have never seen Sterling's code, so it is quiet difficult to find exact solution. If I were you I would look after piece of code starting with: and ending with: It could be located in 'header.php' file of your template. ( See Appearance -> Editor ) |
Wordpress |
Type: | Code Example |
Category: | Coding |
Sub Category: | Code Example |
Uploaded by: | Admin |
Views: | 8 |