Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying WordPress Web Application Development - Second Edition
  • Table Of Contents Toc
WordPress Web Application Development - Second Edition

WordPress Web Application Development - Second Edition

By : Rakhitha Nimesh Ratnayake
5 (2)
close
close
WordPress Web Application Development - Second Edition

WordPress Web Application Development - Second Edition

5 (2)
By: Rakhitha Nimesh Ratnayake

Overview of this book

This book is intended for WordPress developers and designers who want to develop quality web applications within a limited time frame and for maximum profit. Prior knowledge of basic web development and design is assumed.
Table of Contents (14 chapters)
close
close
13
Index

Customizing the main navigation menu


In WordPress, the main navigation menu is located on the left-hand side of the screen where we have access to all the sections of the application. In a similar way to the admin toolbar, we have the ability to extend the main navigation menu with customized versions.

Let's start by adding the admin menu invoking an action to the constructor:

add_action( 'admin_menu', array( $this,'wpwa_customize_main_navigation' ) );

Now, consider the initial implementation of the wpwa_customize_main_navigation function:

public function wpwa_customize_main_navigation(){
    global $menu,$submenu;
    echo "<pre>";print_r($menu);echo "</pre>";exit;
}

The preceding code uses the global variable menu for accessing the available main navigation menu items. Before we begin the customizations, it's important to get used to the structure of the menu array using a print_r statement. A part of the output generated from the print_r statement is shown in the following section...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
WordPress Web Application Development - Second Edition
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon