Jump to content
Sign in to follow this  
augemundial

Custom Post types?

Recommended Posts

augemundial

I've created a custom post type named "companies". I've read some tutorials and seems like I only have to include a companies.php with a loop within the code in order to get a listing of my posts. But that's not working. Does pagelines support custom post types? what is the correct way to get a listing of my elements? thank you

Share this post


Link to post
Share on other sites
kastelic

You just need to set your post type to "has archive", and it will create one in http://yoursite.com/companies. If you used a plugin like Custom Post Types UI then it has this option. If you want to see your custom post types on the home page you can paste this function in platformbase/functions.php:

		// enables any post type
		add_action('pagelines_inside_top_theloop' ,'enable_custom');
		function enable_custom(){
			if (is_home()){
				$args = array(
					'post_type'=> 'any',
				);
				query_posts($args);
			}
		}
	
	

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  

×