News Update :
Home » » Generate custom post types with WordPress

Generate custom post types with WordPress

By: Unknown on Monday 16 February 2015 | 08:09

By default there are pages and articles, it can be very useful when you want to customize a WordPress site for a client.
 



It could ultimately handle these situations with pages and create custom field. But if we want to make it simple administration, add custom post type is advised.
 




 
We will create an example for testimonials.

There are very interesting extensions, but in our case we are going to build ourselves.

I suggest as an extension: Types , you can add add-ons like views .
First we will add a file that we will call posttype.php we'll call in function.php



/**
 * Custom Post type
 */
require get_template_directory() . '/posttype.php';



 

Then we could write it by hand, but it will make life easier with this link that generates custom post types

Then it is important to reset the permalinks.

Go to Settings / Permalinks and click Save.




See all testimony


To create an archive page:

archive-temoignage.php and we'll copy / paste the archive content.

This will allow us to see all the archive page votresite.com/temoignage

Then we can play with the content ....
 
Contact Us | Privacy policy | Term of use | Advertise with Us | Site map
Copyright © 2011. Blogging Brain . All Rights Reserved.
Design Template by Blogging Brain | | Powered by Blogger