{"id":33634,"date":"2014-03-26T17:41:08","date_gmt":"2014-03-26T21:41:08","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=33634"},"modified":"2016-02-18T06:53:59","modified_gmt":"2016-02-18T11:53:59","slug":"opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-menu-tab-based-on-bootstrap-templates","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-menu-tab-based-on-bootstrap-templates.html","title":{"rendered":"OpenCart. How to add a new content page and link it to a new menu tab (based on Bootstrap templates)"},"content":{"rendered":"<p><\/p>\r\n<p>This tutorial is going to show how to add a new content page and link it to a new menu tab.<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=ak6JE2YMkIk?width=1280&amp;height=720\" rel=\"prettyPhoto\">OpenCart. How to add a new content page and link it to a new menu tab (based on Bootstrap templates)<\/a><\/p>\r\n<ol>\r\n<li>\r\n<p>Log into your OpenCart administration panel (yoursite.com\/admin). <\/p>\r\n<\/li>\r\n<li>\r\n<p>Navigate to <strong> Catalog  -&gt; Information<\/strong>.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab1-300x168.jpg\" alt=\"opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab1\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-33635\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab1-300x168.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab1-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab1.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<\/li>\r\n<li>\r\n<p>Click the <strong>Insert<\/strong> button to add a new content page.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab2-300x168.jpg\" alt=\"opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab2\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-33636\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab2-300x168.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab2-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab2.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<\/li>\r\n<li>\r\n<p>Type in the name of your page and insert the page text to the <strong>Description<\/strong> field. You can use the visual editor to format your text. Insert images and create hyperlinks. You can also edit HTML code. Just click on the <strong>Source<\/strong> button.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab3.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab3-300x168.jpg\" alt=\"opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab3\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-33637\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab3-300x168.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab3-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab3.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<\/li>\r\n<li>\r\n<p>Select the <strong>Data<\/strong> tab. Here you can define page keywords, set Sort Order, the bottom footer display and enable or disable the page.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab4.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab4-300x168.jpg\" alt=\"opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab4\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-33638\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab4-300x168.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab4-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab4.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<\/li>\r\n<li>\r\n<p> Save the changes and check your store online. Content pages are being displayed in the <strong>Information block<\/strong>.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab5.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab5-300x168.jpg\" alt=\"opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab5\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-33639\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab5-300x168.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab5-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab5.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<\/li>\r\n<li>\r\n<p>We need to edit the code of the <strong>header.tpl<\/strong> file in order to add our content page to the top menu. The file is located in the <strong>\/catalog\/view\/theme\/themeXXX\/template\/common<\/strong> folder. <\/p>\r\n<\/li>\r\n<li>\r\n<p>Edit the file using any PHP\/code editor. Search for the menu code. It should look similar to the following:<\/p>\r\n<pre class=\"brush:php\">\t\r\n&lt;ul class=&quot;links&quot;&gt;\r\n    &lt;?php if (!isset($this-&gt;request-&gt;get['route'])) { $route='active'; }  else {$route='';}?&gt;\r\n    &lt;li class=&quot;first&quot;&gt;&lt;a class=&quot;&lt;?php echo $route; if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;common\/home&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $home; ?&gt;&quot;&gt;&lt;i class=&quot;icon-home&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_home; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;account\/wishlist&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $wishlist; ?&gt;&quot; id=&quot;wishlist-total&quot;&gt;&lt;i class=&quot;icon-star&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_wishlist; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;account\/account&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $account; ?&gt;&quot;&gt;&lt;i class=&quot;icon-user&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_account; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;checkout\/cart&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $shopping_cart; ?&gt;&quot;&gt;&lt;i class=&quot;icon-shopping-cart&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_shopping_cart; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;checkout\/checkout&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $checkout; ?&gt;&quot;&gt;&lt;i class=&quot;icon-check&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_checkout; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;?php if (!$logged) { ?&gt;\r\n    &lt;?php echo $text_welcome; ?&gt;\r\n    &lt;?php } else { ?&gt;\r\n    &lt;?php echo $text_logged; ?&gt;\r\n    &lt;?php } ?&gt;\r\n&lt;\/ul&gt;       <\/pre>\r\n<p class=\"info-box\"><strong>NOTE:<\/strong> The code may vary depending on the template.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Each line of code displays one menu element. Copy the last line of code:<\/p>\r\n<pre class=\"brush:php\">\r\n&lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;checkout\/checkout&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $checkout; ?&gt;&quot;&gt;&lt;i class=&quot;icon-check&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_checkout; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n<\/pre>\r\n<p>Add a new line and paste the code you have copied.<\/p>\r\n<\/li>\r\n<li>\r\n<p>We need to change the condition of assigning &#8220;active&#8221; CSS class for our new menu item. Let&#8217;s replace:<\/p>\r\n<pre class=\"brush:php\">\r\n&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;checkout\/checkout&quot;) {echo &quot;active&quot;;} ?&gt;\r\n<\/pre>\r\n<p>with:<\/p>\r\n<pre class=\"brush:php\">\r\n&lt;?php if ((isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;information\/information&quot;) &amp;&amp; (isset($this-&gt;request-&gt;get['information_id']) &amp;&amp; $this-&gt;request-&gt;get['information_id']==&quot;13&quot;)) {echo &quot;active&quot;;} ?&gt;\r\n<\/pre>\r\n<p>That is the code for the Information page. You should replace <strong>13<\/strong> with the ID of your new page.<\/p>\r\n<p>The following code:<\/p>\r\n<pre class=\"brush:php\">&lt;?php echo $text_checkout; ?&gt;<\/pre>\r\n<p>should be changed to the title of the menu element. That is <strong>Test<\/strong> in our case.<\/p>\r\n<p class=\"attention\"><strong>NOTE:<\/strong> &lt;i class=&#8221;icon-check&#8221;&gt;&lt;\/i&gt; is the code for the <strong>Font Awesome<\/strong> icon. You may replace the class with the one you like.  You can find the list of icons and their classes by going to the following<a rel=\"nofollow\" target=\"_blank\" href=\"http:\/\/fortawesome.github.io\/Font-Awesome\/cheatsheet\/\"> link <\/a>. The version of Font icons can be checked in the \/catalog\/view\/theme\/themeXXX\/stylesheet\/font-awesome.css file of the template.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab6.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab6-300x168.jpg\" alt=\"opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab6\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-33642\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab6-300x168.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab6-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab6.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<\/li>\r\n<li>\r\n<p>We need to get the URL to our content page to link it to the top menu. Click on the page link in the Information block and copy the URL from the address bar of your web browser.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab7.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab7-300x168.jpg\" alt=\"opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab7\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-33643\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab7-300x168.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab7-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab7.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>Then change the following code:<\/p>\r\n<pre class=\"brush:php\">&lt;?php echo $checkout; ?&gt;<\/pre>\r\n<p>to the URL to our content page we have copied. <\/p>\r\n<\/li>\r\n<li>\r\n<p> Here is the complete line with the changes we have applied:<\/p>\r\n<pre class=\"brush:php\">\r\n&lt;li&gt;&lt;a class=&quot;&lt;?php if ((isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;information\/information&quot;) &amp;&amp; (isset($this-&gt;request-&gt;get['information_id']) &amp;&amp; $this-&gt;request-&gt;get['information_id']==&quot;13&quot;)) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;http:\/\/templatetesting.com\/vincent\/index.php?route=information\/information&amp;information_id=13&quot;&gt;&lt;i class=&quot;icon-bug&quot;&gt;&lt;\/i&gt;Test&lt;\/a&gt;&lt;\/li&gt;\r\n                <\/pre>\r\n<p class=\"attention\">Don&#8217;t forget to replace <strong>13<\/strong> with the actual ID of your new page.<\/p>\r\n<\/li>\r\n<li>\r\n<p>And the complete menu code block will look like this:<\/p>\r\n<pre class=\"brush:php\"> \t\r\n&lt;ul class=&quot;links&quot;&gt;\r\n    &lt;?php if (!isset($this-&gt;request-&gt;get['route'])) { $route='active'; }  else {$route='';}?&gt; &lt;li class=&quot;first&quot;&gt;&lt;a class=&quot;&lt;?php echo $route; if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;common\/home&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $home; ?&gt;&quot;&gt;&lt;i class=&quot;icon-home&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_home; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;account\/wishlist&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $wishlist; ?&gt;&quot; id=&quot;wishlist-total&quot;&gt;&lt;i class=&quot;icon-star&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_wishlist; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;account\/account&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $account; ?&gt;&quot;&gt;&lt;i class=&quot;icon-user&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_account; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;checkout\/cart&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $shopping_cart; ?&gt;&quot;&gt;&lt;i class=&quot;icon-shopping-cart&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_shopping_cart; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;checkout\/checkout&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $checkout; ?&gt;&quot;&gt;&lt;i class=&quot;icon-check&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_checkout; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;li&gt;&lt;a class=&quot;&lt;?php if ((isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;information\/information&quot;) &amp;&amp; (isset($this-&gt;request-&gt;get['information_id']) &amp;&amp; $this-&gt;request-&gt;get['information_id']==&quot;13&quot;)) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;http:\/\/templatetesting.com\/vincent\/index.php?route=information\/information&amp;information_id=13&quot;&gt;&lt;i class=&quot;icon-bug&quot;&gt;&lt;\/i&gt;Test&lt;\/a&gt;&lt;\/li&gt; \r\n    &lt;?php if (!$logged) { ?&gt;\r\n    &lt;?php echo $text_welcome; ?&gt;\r\n    &lt;?php } else { ?&gt;\r\n    &lt;?php echo $text_logged; ?&gt;\r\n    &lt;?php } ?&gt;\r\n&lt;\/ul&gt;\r\n       <\/pre>\r\n<\/li>\r\n<li>\r\n<p>Save the file. The page has been added to the header menu.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Now let&#8217;s add the link to our new page to the mobile view menu. We can check that in <strong>Firefox<\/strong> browser: <strong>Web developer-&gt;Responsive design view<\/strong> menu (Ctrl + Shift + M).<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab8.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab8-300x168.jpg\" alt=\"opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab8\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-33644\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab8-300x168.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab8-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab8.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<\/li>\r\n<li>\r\n<p>In the same file, we need to find the code <strong>&lt;div class=&#8221;swipe-menu&#8221;&gt;<\/strong>. It marks the list of mobile menu items, which contains both header and footer links from the desktop view. The whole code looks like this:<\/p>\r\n<pre class=\"brush:php\">\r\n &lt;div class=&quot;swipe-menu&quot;&gt;\r\n&lt;ul class=&quot;links&quot;&gt;\r\n&lt;?php if (!isset($this-&gt;request-&gt;get['route'])) { $route='active'; }  else {$route='';}?&gt; &lt;li class=&quot;first&quot;&gt;&lt;a class=&quot;&lt;?php echo $route; if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;common\/home&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $home; ?&gt;&quot;&gt;&lt;i class=&quot;icon-home&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_home; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;account\/wishlist&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $wishlist; ?&gt;&quot; id=&quot;wishlist-total&quot;&gt;&lt;i class=&quot;icon-star&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_wishlist; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;account\/account&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $account; ?&gt;&quot;&gt;&lt;i class=&quot;icon-user&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_account; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;checkout\/cart&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $shopping_cart; ?&gt;&quot;&gt;&lt;i class=&quot;icon-shopping-cart&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_shopping_cart; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;checkout\/checkout&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $checkout; ?&gt;&quot;&gt;&lt;i class=&quot;icon-check&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_checkout; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;?php if (!$logged) { ?&gt;\r\n&lt;?php echo $text_welcome; ?&gt;\r\n&lt;?php } else { ?&gt;\r\n&lt;?php echo $text_logged; ?&gt;\r\n&lt;?php } ?&gt;\r\n&lt;\/ul&gt;\r\n&lt;?php echo $language; ?&gt;\r\n&lt;?php echo $currency; ?&gt;\r\n&lt;?php if ($informations) { ?&gt;\r\n&lt;ul class=&quot;foot&quot;&gt;\r\n&lt;?php foreach ($informations as $information) { ?&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $information['href']; ?&gt;&quot;&gt;&lt;?php echo $information['title']; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;?php } ?&gt;\r\n&lt;\/ul&gt;\r\n&lt;?php } ?&gt;\r\n&lt;ul class=&quot;foot foot-1&quot;&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $contact; ?&gt;&quot;&gt;&lt;?php echo $text_contact; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $return; ?&gt;&quot;&gt;&lt;?php echo $text_return; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $sitemap; ?&gt;&quot;&gt;&lt;?php echo $text_sitemap; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;ul class=&quot;foot foot-2&quot;&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $manufacturer; ?&gt;&quot;&gt;&lt;?php echo $text_manufacturer; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $voucher; ?&gt;&quot;&gt;&lt;?php echo $text_voucher; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $affiliate; ?&gt;&quot;&gt;&lt;?php echo $text_affiliate; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $special; ?&gt;&quot;&gt;&lt;?php echo $text_special; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;ul class=&quot;foot foot-3&quot;&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $order; ?&gt;&quot;&gt;&lt;?php echo $text_order; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $newsletter; ?&gt;&quot;&gt;&lt;?php echo $text_newsletter; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/div&gt;\r\n     <\/pre>\r\n<\/li>\r\n<li>\r\n<p>Let&#8217;s add the code for our new header link to the mobile menu after the checkout item (we need to add that above the line):\r\n<pre class=\"brush:php\">&lt;?php if (!$logged) { ?&gt;<\/pre>\r\n<p> The modified code will look like the following: <\/p>\r\n<pre class=\"brush:php\">\t\r\n&lt;div class=&quot;swipe-menu&quot;&gt;\r\n&lt;ul class=&quot;links&quot;&gt;\r\n&lt;?php if (!isset($this-&gt;request-&gt;get['route'])) { $route='active'; }  else {$route='';}?&gt; &lt;li class=&quot;first&quot;&gt;&lt;a class=&quot;&lt;?php echo $route; if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;common\/home&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $home; ?&gt;&quot;&gt;&lt;i class=&quot;icon-home&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_home; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;account\/wishlist&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $wishlist; ?&gt;&quot; id=&quot;wishlist-total&quot;&gt;&lt;i class=&quot;icon-star&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_wishlist; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;account\/account&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $account; ?&gt;&quot;&gt;&lt;i class=&quot;icon-user&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_account; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;checkout\/cart&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $shopping_cart; ?&gt;&quot;&gt;&lt;i class=&quot;icon-shopping-cart&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_shopping_cart; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a class=&quot;&lt;?php if (isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;checkout\/checkout&quot;) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;&lt;?php echo $checkout; ?&gt;&quot;&gt;&lt;i class=&quot;icon-check&quot;&gt;&lt;\/i&gt;&lt;?php echo $text_checkout; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a class=&quot;&lt;?php if ((isset($this-&gt;request-&gt;get['route']) &amp;&amp; $this-&gt;request-&gt;get['route']==&quot;information\/information&quot;) &amp;&amp; (isset($this-&gt;request-&gt;get['information_id']) &amp;&amp; $this-&gt;request-&gt;get['information_id']==&quot;13&quot;)) {echo &quot;active&quot;;} ?&gt;&quot; href=&quot;http:\/\/templatetesting.com\/vincent\/index.php?route=information\/information&amp;information_id=13&quot;&gt;&lt;i class=&quot;icon-bug&quot;&gt;&lt;\/i&gt;Test&lt;\/a&gt;&lt;\/li&gt; \r\n&lt;?php if (!$logged) { ?&gt;\r\n&lt;?php echo $text_welcome; ?&gt;\r\n&lt;?php } else { ?&gt;\r\n&lt;?php echo $text_logged; ?&gt;\r\n&lt;?php } ?&gt;\r\n&lt;\/ul&gt;\r\n&lt;?php echo $language; ?&gt;\r\n&lt;?php echo $currency; ?&gt;\r\n&lt;?php if ($informations) { ?&gt;\r\n&lt;ul class=&quot;foot&quot;&gt;\r\n&lt;?php foreach ($informations as $information) { ?&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $information['href']; ?&gt;&quot;&gt;&lt;?php echo $information['title']; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;?php } ?&gt;\r\n&lt;\/ul&gt;\r\n&lt;?php } ?&gt;\r\n&lt;ul class=&quot;foot foot-1&quot;&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $contact; ?&gt;&quot;&gt;&lt;?php echo $text_contact; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $return; ?&gt;&quot;&gt;&lt;?php echo $text_return; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $sitemap; ?&gt;&quot;&gt;&lt;?php echo $text_sitemap; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;ul class=&quot;foot foot-2&quot;&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $manufacturer; ?&gt;&quot;&gt;&lt;?php echo $text_manufacturer; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $voucher; ?&gt;&quot;&gt;&lt;?php echo $text_voucher; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $affiliate; ?&gt;&quot;&gt;&lt;?php echo $text_affiliate; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $special; ?&gt;&quot;&gt;&lt;?php echo $text_special; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;ul class=&quot;foot foot-3&quot;&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $order; ?&gt;&quot;&gt;&lt;?php echo $text_order; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=&quot;&lt;?php echo $newsletter; ?&gt;&quot;&gt;&lt;?php echo $text_newsletter; ?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/div&gt;\r\n     <\/pre>\r\n<\/li>\r\n<li>\r\n<p>Save the changes and refresh your browser page. We have added a new content page and linked it to a new menu tab successfully.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab9.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab9-300x168.jpg\" alt=\"opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab9\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-33645\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab9-300x168.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab9-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2014\/03\/opencart-how-to-add-a-new-content-page-and-link-it-to-a-new-tab9.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=ak6JE2YMkIk?width=1280&amp;height=720\" rel=\"prettyPhoto\">OpenCart. How to add a new content page and link it to a new menu tab (based on Bootstrap templates)<\/a><\/p>\r\n<p><\/p>\r\n<p><\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial is going to show how to add a new content page and link it to a new menu tab.<\/p>\n","protected":false},"author":49,"featured_media":33657,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1156],"tags":[1158,1379,536,616,571,617,1157,572],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/33634"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/49"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=33634"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/33634\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/33657"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=33634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=33634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=33634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}