Jump to content
Sign in to follow this  
pfflyer

Adding Custom Fields to the Features Custom Post Type

Recommended Posts

pfflyer

I have run into this problem before: various WordPress plugins attach themselves to Single Posts. Thus, they attach to the custom post types and basically mess up your Features, etc. Now some plugins have been savvy enough to create a key and value you can use to shut them off on particular posts. However, the custom field section is not available on the Features Custom Post Types screen. Is there a way I can do that myself by adding something to the code? Or is this an issue the Pagelines team will have to think about? Thanks in Advance.

Share this post


Link to post
Share on other sites
Kate

I can see that custom fields aren't available by default, however, I know they can be added to custom post types. However, off the top of my head, I'm not sure of the best approach to do that with this already defined feature post type :) I'm marking this for the developers...

Share this post


Link to post
Share on other sites
pfflyer

Let me know what the developers say. I have done some research and could probably customize it myself. I just hate doing that though because I know i will forget it is there the next time I upgrade!

Share this post


Link to post
Share on other sites
kastelic

Hi, activate platformbase and then paste this into platformbase/functions.php

		//Adds support for custom fields to Feature post type
		add_action('init', 'my_custom_init');
		function my_custom_init() {
			add_post_type_support( 'feature', 'custom-fields' );
		}
	

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×