Once you start a blog on your store, one of the first things to do is to promote it across your website. You can add blog posts to homepage, add related posts to product pages or try some other way. But the simplest of all is to add a blog link to the Magento navigation menu.
That's what you'll learn to do with the
. Since the process differs depending on the theme you use, we'll describe a few different cases.
Post Contents [hide]
Add/Remove Blog Link from Magento Navigation Menu
- Navigate to the Stores > Configuration > Magefan Extensions > Blog and find the Category Top Navigation section.
- Choose whether to Display Blog Link in a corresponding select box.
- Add the Link Text that will be displayed on the frontend.
- Select whether to Include Blog Categories in the menu and specify the Maximal Depth of the subcategory levels.
Note: you can define whether to include a blog category in a menu directly on the blog category page.
Don't forget to Save the settings once you finish and check the blog link in the navigation menu on the storefront.
Note: to configure blog route (blog homepage URL) navigate to blog permalink settings.
These settings work for the majority of themes. However, if you've configured the blog navigation link, and it doesn't appear in the menu you might have a custom theme.
Add/Remove Blog Link from Magento 2 Ultimo Theme
If you have already installed Magento 2 Blog Module v2.6.2 (or later) you can easily add a blog link to the menu on your Ultimo Theme.
- Navigate to Content > Blocks and find a block with the "block_nav_links" identifier.
- Start editing this block and add the following code to the block content:
{
{block class="Magefan\Blog\Block\Infortis\UltraMegamenu\Topmenu"}}Don't forget to Save a block and check the new menu item in your Ultimo Theme.
Add/Remove Blog Link from Magento SmartWave Porto Theme
Adding menu items in SmartWave Mega Menu is very similar to Ultimo Theme, especially if you have Magento 2 Blog v2.6.2 (or later).
Add blog link
- Go to the Content > Blocks and find a block with the "porto_custom_menu" identifier.
- Add the following code to the block content:
{
{block class="Magefan\Blog\Block\Smartwave\Megamenu\Topmenu menu_type="classic"}}3. Save the changes and flush Magento cache.
You can also use another menu_type values (staticwidth, fullwidth) to change how blog submenu items look.
{{block class="Magefan\Blog\Block\Smartwave\Megamenu\Topmenu menu_type="fullwidth"}}
{ {block class="Magefan\Blog\Block\Smartwave\Megamenu\Topmenu menu_type="staticwidth"}}
Remove blog link
If SmartWave Porto Theme includes Magefan Blog by default, and you want to remove the blog from the top links, take the following steps.
1. Create a new file in your child theme (ThemeVendor/theme-name) directory:
app/design/frontend/ThemeVendor/theme-name/ Magefan_Blog/layout/default. xml
2. Edit the file and add the following XML code there:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="top_blog_link" remove="true" />
</body>
</page>
3. Save the changes and flush the Magento cache to remove the blog link.
Now when people visit your website they can easily discover blog link in the navigation menu. But that's not the only way how they will find your blog.
The majority will land on blog pages directly from search. So, make sure to create blog posts that drive traffic, entertain and convert.
In case you use Porto theme then you can check this article
https://magefan.com/blog/magento2-blog-url-in-porto-megamenu
If ultimo theme, then this one:
https://magefan.com/blog/magento2-ultimo-blog-link
If you use some other theme that has mega menu functionality then check the theme documentation on how to add a new menu items