Book Image

WordPress Complete, Sixth Edition - Sixth Edition

By : Karol Król
Book Image

WordPress Complete, Sixth Edition - Sixth Edition

By: Karol Król

Overview of this book

WordPress Complete, Sixth Edition is a practical guide for everyone who wants to start their journey as an online publisher, website owner, or even a website developer. It takes you step-by-step through the process of planning out and building your site, and offers loads of screenshots and examples along the way. It's also a beginner's guide to theme and plugin development. This book begins with the basics of WordPress, followed by the different components that you as a developer will need to use to work swiftly and efficiently. The book starts by introducing WordPress to new readers in this field. You are then shown how to set it up, implement a blog, and use plug-ins and widgets. You'll use themes to make any website look and feel better and more original. You also learn how to create your own themes and perform testing to ensure your website is bug-free. You will also acquire some idea of how to use WordPress for non-blog-like websites. By the end of the book, you will feel confident enough to design high-quality websites and will be familiar with the ins and outs of WordPress
Table of Contents (14 chapters)

Enabling a menu in your theme

The good news I have for you right now is that menus are already enabled in the structure of the theme we're creating here. Because we used the wp_nav_menu() function in the header of the site (in the header.php file), if the user creates a menu in Appearance | Menus and then assigns it to the area indicated as Primary Menu, it will show up on the site.

If you want to have more than one navigation menu in your theme, you can register multiple navigation menu locations, let the user create multiple menus and choose which menu goes in which location. To learn more about this, check out the Codex at https://codex.wordpress.org/Navigation_Menus.

Learning more
The wp_nav_menu() function is quite powerful and can take a number of parameters that will let you control the classes and IDs, the name of the menu, and more. Take a look here: https://developer...