We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    1) To define plugin, add below code

    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
        <type name="MagentoThemeBlockHtmlTopmenu">
            <plugin name="custom_menu_item" type="MagemonkeysAddCustomeMenuPluginTopmenu" sortOrder="10" disabled="false"/>
        </type>
    </config>

    in your app/code/Magemonkeys/AddCustomeMenu/etc/frontend/di.xml file.

    2) Now, Create Topmenu.php Plugin file at app/code/Magemonkeys/AddCustomeMenu/Plugin/ and paste the below code :

    <?php
    namespace MagemonkeysAddCustomeMenuPlugin;
    use MagentoFrameworkDataTreeNodeFactory;
    use MagentoFrameworkUrlInterface;
    
    class Topmenu {
        /**
         * @var NodeFactory
         */
        protected $nodeFactory;
        /**
         * @var UrlInterface
         */
        protected $urlBuilder;
        /**
         * @param NodeFactory  $nodeFactory
         * @param UrlInterface $urlBuilder
         */
        public function __construct(
            NodeFactory $nodeFactory,
            UrlInterface $urlBuilder
        ) {
            $this->nodeFactory = $nodeFactory;
            $this->urlBuilder = $urlBuilder;
        }
        public function beforeGetHtml(
            MagentoThemeBlockHtmlTopmenu $subject,
            $outermostClass = '',
            $childrenWrapClass = '',
            $limit = 0
        ) {
            /**
             * Parent Menu
             */
            $menuNode = $this->nodeFactory->create(
                [
                    'data' => $this->getNodeAsArray("CMS Pages", "cms-page"),
                    'idField' => 'id',
                    'tree' => $subject->getMenu()->getTree(),
                ]
            );
            /**
             * Add Child Menu
             */
            $menuNode->addChild(
                $this->nodeFactory->create(
                    [
                        'data' => $this->getNodeAsArray("Abouts us", "abouts-us"),
                        'idField' => 'id',
                        'tree' => $subject->getMenu()->getTree(),
                    ]
                )
            );
    
            $menuNode->addChild(
                $this->nodeFactory->create(
                    [
                        'data' => $this->getNodeAsArray("Store Location", "store-location"),
                        'idField' => 'id',
                        'tree' => $subject->getMenu()->getTree(),
                    ]
                )
            );
    
            $subject->getMenu()->addChild($menuNode);
        }
        protected function getNodeAsArray($name, $id) {
            $url = $this->urlBuilder->getUrl($id);
            return [
                'name' => __($name),
                'id' => $id,
                'url' => $url,
                'has_active' => false,
                'is_active' => false,
            ];
        }
    }

    3) Output :

    field_5bfb909c5ccae

      Get a Free Quote