Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

WordCamp Kent 2019 - WP 101: Custom Post Type & Custom Fields

44 views

Published on

Custom Fields and Custom Post Types, How to use, How to Create. How to add extra menus

Published in: Internet
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

WordCamp Kent 2019 - WP 101: Custom Post Type & Custom Fields

  1. 1. WP 101: Custom Fields& Custom Post Types Joe Querin – www.joequerin.com WordCamp Kent – June 15, 2019 @joequerin joecue joecue
  2. 2. { Overview } • Custom Fields vs Custom Post Types • Ways to Customize WordPress • What is CSS? • Need more menus? • Questions
  3. 3. { Custom Post Types } • WordPress stores all page and post data as a post type. • There are actually 5 core post types • Post – Blog Entry • Page – Static content • Attachment – Document, Image, Video, etc. • Revision – Version of a Post or Page • Menu – Navigation/Menu Item
  4. 4. Example Scenario • Let’s say you have a food blog and you want to use a custom post type to display your recipes. • So you use the awesome code we just looked at, customized it to represent your menu offerings. Created categories for breakfast, lunch, dinner, appetizers, desserts.
  5. 5. Example Scenario • You have populated your menu with all of your fantastic recipes. • Life is good!
  6. 6. Example Scenario • Now let’s say 3 months or 6 months, or maybe even a whole year goes by, and everything is still good. • Then you find the ultimate theme, it’s great, it looks just like you want your website to look. • So you install it, then you activate it. • Then later that day or the next someone emails and asks where are your recipes, so you tell them to click on recipes, and they ask WHERE? I’m on your site and there are no recipes.
  7. 7. Example Scenario • So you go to your site and check. Hmmm no menu…. • Then in 3…2…1.. You panic!
  8. 8. { Custom Post Types } • WordPress allows you to create your own custom post type. • Allows you to format content in a particular way. • Recipes • Products (non-ecommerce) • Frequently Asked Questions • Etc.
  9. 9. { Custom Post Types } function create_post_type() { register_post_type( 'acme_product', array( 'labels' => array( 'name' => __( 'Products' ), 'singular_name' => __( 'Product' ) ), 'public' => true, 'has_archive' => true, ) ); } add_action( 'init', 'create_post_type' ); Sample code from https://codex.wordpress.org/Post_Types
  10. 10. { Custom Post Types } • Plugins – Custom Post Types UI • https://generatewp.com/
  11. 11. { Custom Fields } • The codex defines a custom field as meta- data, that contains a key/value pair. • ????
  12. 12. { Custom Fields } • I’ll admit, it’s pretty technical and confusing • If you keep reading the codex page though, you’ll see what a key/value pair is. • Key – the name of the meta-data • Value – the meta-data • Example: – Key: Currently Reading – Value: Calvin and Hobbes
  13. 13. { Custom Fields } • What can you do with custom fields? • Announcement features on your website • First create a custom post type to handle the announcement content – Title – Description – Photo • How about an announcement start date?
  14. 14. { Custom Fields } • Create a custom field – Start Date – built in scheduling of Post – Display End Date – Importance • Using some PHP logic we can display the content we can make the post automatically display based upon the server’s date as well as when to stop.
  15. 15. { Custom Fields } • Using similar PHP logic, we can even change the CSS class or ID of the containing element to make the announcement appear different.
  16. 16. { Customize WP } • WordPress Customizer • Header Image • Site Title / Tagline • Colors • Additional CSS • Jetpack Plugin • Additional CSS option
  17. 17. { Customize WP } • Page Builders • Gutenberg • Beaver Builder • Bold Grid • Divi • Custom Field Plugins
  18. 18. { Menus – More Menus } • Adding new menus • WP Dashboard • Theme modification • WP Dashboard • Appearance -> Menu • New Menu • Add Menu Items
  19. 19. { Menus – More Menus } • Theme Function File – Create Menu Definition • Creates Menu Position • Relevant Theme File – Header.php – Footer.php – Sidebar.php, sidebar-_____.php – Page.php – Etc…
  20. 20. { Menus – More Menus } • Add wp_nav_menu() function call wp_nav_menu( array( 'menu' => 'Top Navigation', 'sub_menu' => true ) );
  21. 21. { Thanks! } Joe Querin www.joequerin.com @joequerin joecue joecue

×