Default MOODLE menu has only Home, Dashboard and My Courses menu items for logged-in users and it displays only Home for Anonyms users. Images of logged-in users and anonyms users are displayed below.
Custom Menu Items in MOODLE
For most of the use cases this menu is not sufficient and we want to add more menu items to the menu. MOODLE made it easy to add menu items with the help of Custom menu items available in Advanced Theme Settings. You can find this option by visiting
Site Administration > Appearance > Advanced Theme Settings
On Advanced Theme Settings page, you have to find a text box named “Custom menu items”. This textbox looks like the image given below.
Add menu items
Each line you write in this textbox will become a menu item in MOODLE menu. You just need to know the format of creating menu item. Format is:
Menu Item|URL
If you want to add an external link to ETmantra.com you can do this simply by writing
ETmantra|https://etmantra.com
If you want to add a menu item that takes user to same MOODLE website, you don’t need to mention full url to the website. You can do that by writing
All Courses|/courses/
If you want to create a sub menu where Top menu will not point to an URL, you can write it like this
Top Menu
-Sub menu item | URL
Finally, if you want to add a divider between sub menu items you can write it like this
Top Menu
-Sub menu item|URL
-###
-Sub menu item 2|URL
If you want external url to open in new tab, you can add “target=_blank” at the end of menu item.
Top Menu
-Sub menu item|URL “target=_blank”
-###
-Sub menu item 2|URL “target=_blank”
Output
For one of our client, we wanted to add links to their main website hence we added the following code.
About Us|https://competex.in/about-us/ "target=_blank"
Daily Free Initiatives
-Daily Current Affairs|https://competex.in/daily-current-affair "target=_blank"
-Daily Current Affairs Quiz|https://competex.in/quiz "target=_blank"
-Ace Answer Writing|https://competex.in/ace-answer-writing "target=_blank"
Courses
-Master Essay Writing 2024|https://competex.in/master-essay-writing-2024-elevate-your-upsc-mains-preparation-in-60-days/ "target=_blank"
-Samriddhi Mentorship Program|https://competex.in/samriddhi-mentorship-for-upsc-2025/ "target=_blank"
Blog|https://competex.in/blog/ "target=_blank"
This code helped in creating a desired menu, as shown below:
I hope, this information will help you in creating a custom menu items for your MOODLE website.
If you are facing any issue in MOODLE, you can write that in comment or contact us.