Categories

Featured templates

WordPress. How to work with page blocks and assign them to main menu

Guillaume Dumas August 8, 2015
Rating: 4.7/5. From 3 votes.
Please wait...

This tutorial shows how to create an internal link for a specific page block and assign it to the main menu in WordPress.

WordPress. How to work with page blocks and assign them to main menu

There are several ways of creating an internal link. In this tutorial we will use an id attribute of an element as a hook for a link.

In order to create an internal link, you should perform the following:

  1. Log into your Dashboard, go to Pages -> All Pages and open the page that has the block in question in the Text editor mode:

    Untitled-1

  2. Locate the title of the block you’d like to link. You can use the search tool for that:

    Untitled-2

  3. Check whether the heading you have located has already an id attribute. If it doesn’t, create it. The result should look like this:

    We Provide

    Untitled-3

  4. After you have found or added an id attribute to the header element of your block, copy the id attribute or write it down.

  5. Go to Appearance -> Menus select from the drop down Header Menu (Header Menus), click Select.

  6. On the left you’ll see three options to insert a menu item: Pages, Custom Links and Categories. Select the Custom Links option and enter the URL for your new link in the form of http://my.website.com/#id, where http://my.website.com/ is your home page URL and #id is the id attribute of the block you’d like to link. Note, if the block is situated on the home page, you don’t need to specify the home page URL just #id. After you have filled out the URL and Link Text fields, click Add to Menu and Save Menu:

    Untitled-4

  7. Refresh the home page of your site and you will see a new menu item added to the main menu that links to the specific block on the page:

    Untitled-5

Feel free to check the detailed video tutorial below:

WordPress. How to work with page blocks and assign them to main menu

Commercial Wordpress Themes
This entry was posted in WordPress Tutorials and tagged block, menu, page, WordPress. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket