Portfolio Off But Still Appears To Be On

Hi,

I have Portfolio turned off in Pro’s settings but Portfolio still appears to be functional.

The base page for it appears to be on foleypools.com/photos.

I am not using this functionality and am wondering how to turn it off.

It’s also causing issues with Google Search Bots trying to crawl to pages that don’t exist and that I don’t even know how are getting into the X Portfolio Sitemap.

Really I’d like my site to not have an X Portfolio Sitemap at all.

Thanks

Hello Gregory,

Thanks for reaching out. :slight_smile:

I see that the page is using Portfolio template. Please edit the same in Cornerstone and click on Settings Icon. Under Page Settings > General > Page Template, select a template other then Portfolio.

Thanks.

What?

I don’t think you’re understanding the problem.

I don’t want my website to have a X Portfolio Sitemap XML file on it.

Also, I don’t know what functionality is creating these portfolio pages but I want them gone.

Is there a way to do that?

Hi @gregorylmartin,

If I’m not wrong, you would like to delete the Portfolio post type, right?

To achieve that, please add the following code under functions.php file locates in your child theme:

if ( ! function_exists( 'unregister_post_type' ) ) :
function unregister_post_type( $post_type ) {
    global $wp_post_types;
    if ( isset( $wp_post_types[ $post_type ] ) ) {
        unset( $wp_post_types[ $post_type ] );
        return true;
    }
    return false;
}
endif;

For more information, please take a look at this:

Hope it helps :slight_smile:

I’ll try this and let you know if it gets rid of portfolios but no, this is not all I’m trying to accomplish.

My site has a file in it called x-portfolio-sitemap.xml as I showed you above in my initial post and I’m trying to delete that.

Google is using that file to crawl portfolio type pages and I don’t even want that to be an option for them. No point in sending them that sitemap if my site isn’t going to have portfolio posts at all.

Also, is that code exactly right or do I need to replace “post_type” with “portfolio”?

Hi @gregorylmartin,

Disabling the portfolio post type may not delete or disable that XML, I recommend deleting it or contact the plugin author responsible for XML sitemap generation. And that process may not take effect immediately as Google still hold the cache copy for your site, it must be re-indexed or crawl within Google Webmaster tools.

https://support.google.com/webmasters/answer/6065812?hl=en

Thanks!

Okay, and is that code above exactly right or do I need to replace “post_type” with “portfolio”?

Hi @gregorylmartin,

Try this exactly

   
   if ( ! function_exists( 'x_unregister_post_type' ) ) :
   add_action('init', 'x_unregister_post_type', 100);
function x_unregister_post_type() {
	global $wp_post_types;
		if ( isset( $wp_post_types[ 'x-portfolio' ] ) ) {
		unregister_post_type('x-portfolio');
		return true;
		}
	return false;
}
endif;

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.