Horje
How do I make custom post types not appear as blog posts? - Wordpress Solution
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 - 1

can you show me the function from your theme which is producing breadcrumb? BTW where is album link?


Solution - 2

Hi. 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 - 3

It'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:


/**
 * Uses the page.php template for single albums.
 * 
 * @uses locate_template() To get the template's location.
 *
 * @since Musopress Discography 0.1
 * @return string
 */
function muso_get_album_template( $single_template ) {
	
	global $post;
	
	if ( 'muso-album' == $post->post_type ) {
		$locate = locate_template( 'page.php' );
		if ( !empty( $locate ) )
			$single_template = $locate;
	}
		
	return $single_template;
	
}
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:

	//Use Page template for Single Albums if single-muso-album.php doesn't exist.
	if ( '' == ( locate_template( 'single-muso-album.php' ) ) )
		add_filter( 'single_template', 'muso_get_album_template' );
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 - 4

The 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 - 5

In 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:

<section class="small_banner">
and ending with:
</section>
It could be located in 'header.php' file of your template. ( See Appearance -> Editor )





Wordpress

Related
Redirect exit page: Get external url from custom field - Wordpress Solution Redirect exit page: Get external url from custom field - Wordpress Solution
Problem with headway theme css - Wordpress Solution Problem with headway theme css - Wordpress Solution
Related posts within a taxonomy. - Wordpress Solution Related posts within a taxonomy. - Wordpress Solution
Decrease space - Wordpress Solution Decrease space - Wordpress Solution
How to rebuild WordPress permalinks - Wordpress Solution How to rebuild WordPress permalinks - Wordpress Solution

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8