43 votes

Magento 2 - Homepage is 404

It can happen if one of the products is miss-configured/bad-saved/bad-imported especially url_rewrite table is missing request_path value. What i did to fix it... Open MySQL console & run this ...
Bogdan Le's user avatar
  • 581
23 votes
Accepted

How to load a phtml file only for homepage? (Magento 2)

As per as, Magento2, default.xml is call at every page.If you add this code at default.xml then it would be automatically call every pages of your current theme. If you know about Magento 1.x ...
Amit Bera's user avatar
  • 77.5k
15 votes

Magento 2 - Homepage is 404

In my case, The categories entity had an empty request_path. Go to the database and with the help of this command find the categories or products entities that have an empty request_path SELECT * ...
Usman Yousaf's user avatar
15 votes

Magento 2.3 it's not working properly in localhost

This would be a bug that addresses this commit. Author changed $path to $this->fileDriver->getRealPath($path) which is simply calling realpath() on $path but that might change directory ...
revo's user avatar
  • 360
10 votes

How to load a phtml file only for homepage? (Magento 2)

You can use xml to do this task Inside cms_index_index.xml put xml like this <referenceContainer name="content"> <container name="block.container" htmlTag="div" htmlId="slider....
mrtuvn's user avatar
  • 3,273
8 votes

Setting a unique home page for each store in Magento2

This can be done through the admin, you just need to set the CMS page to only display on the store view you wish instead of all store views. In the admin go to content > pages On the right hand ...
Ben Crook's user avatar
  • 15.7k
8 votes

Change default homepage Magento ver. 2.1.1

Change home page under Stores > Configuration > General > Web > Default Pages > CMS Home Page
Arun Karnawat's user avatar
6 votes
Accepted

Magento 2 : Redirect From Homepage to Login if not Logged

Try following way: Iuk/Homeredirect/etc/frontend/events.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
Sohel Rana's user avatar
  • 35.9k
6 votes

Magento 2 How to add Home link in navigation bar!

I have done by just overriding this file in my custom theme. app/design/frontend/Vendor/theme/Magento_Theme/templates/html/topmenu.phtml <?php $columnsLimit = $block->getColumnsLimit() ?: ...
Ravi Oza's user avatar
  • 478
5 votes

Best way to check if page is home page

If you are looking for the CMS Home Page, Method 2 is better: easier to understand more explicit faster, but I only mention it because you asked, the difference is insignificant But if you want to ...
Fabian Schmengler's user avatar
5 votes

How to load a phtml file only for homepage? (Magento 2)

Create xml file name with /app/design/frontend/Vendor/theme/Magento_Theme/layout/cms_index_index.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="...
Prashant Valanda's user avatar
5 votes
Accepted

Magestore's Banner Slider not working properly(Magento 1.9)

It may be permission issue only. You need to give permission from admin to your block bannerslider/bannerslider Go to Admin -> System -> Permission -> Blocks Add New Block and add block ...
Ashish Jagnani's user avatar
4 votes
Accepted

Magento 2 How to add Home link in navigation bar!

You can do it by creating a simple module: Create registration file: app/code/Magenik/NavLink/registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\...
Nikunj Vadariya's user avatar
3 votes

Best way to check if page is home page

On a side note, it's good to notice that the Magento\Theme\Block\Html\Header\Logo class provides a isHomePage method that looks like this: public function isHomePage() { $currentUrl = $this->...
Raphael at Digital Pianism's user avatar
3 votes

Magento 2: Home page image on Facebook

Go through below links, they might help you out. https://developers.facebook.com/docs/sharing/webmasters https://developers.facebook.com/docs/sharing/best-practices http://ogp.me/ Basically you need ...
Anshu Mishra's user avatar
  • 8,960
3 votes

Magento2 - How to show a block content on homepage

In the home page you can call the static block like the below mentioned way {{block class="Magento\Cms\Block\Block" block_id="your_block_identifier"}} In the html page you can call the static block ...
Naveenbos's user avatar
  • 1,226
3 votes

Remove /home url from sitemap and url site structure

How to remove home identifier from the homepage url inside the generated sitemap. (Tested on CE 1.9.3.4) Before: <loc>http://www.example.com/home</loc> After: <loc>http://www....
KaMZaTa's user avatar
  • 205
3 votes

Remove mulitipul H1 Tags from Homepage

Most likely you can find them in static blocks. A lot of times a good strategy is to just search the contents of your website via Linux command. grep -r "Stuff you are looking for" You can search ...
Timik's user avatar
  • 478
3 votes
Accepted

How to display a timer countdown from a static block

Copy paste this in the cms block. Just change dt = new Date("2017-02-9 09:30:51"); as your requirement. <script type="text/javascript">// <![CDATA[ function getTimer() { dt = ...
Qaisar Satti's user avatar
  • 32.5k
2 votes

Magento 2 Homepage as a Category

Setting Category Page as Home Page in Magento 2 is quite straightforward as Magento1. You can set Default Web URL as "catalog/category/view/id/catId". Replace catID with your desired category ID. I ...
Kanaka Kishore's user avatar
2 votes

Home Page OwlCarousel How To Control What Products To Display

how can we show specific product in slider on home page by passing product is like product_id="10,15,80,98" in collection. {{block type="ultimo/product_list_featured" template="catalog/product/...
mith's user avatar
  • 41
2 votes

Magento2 check in template if page is homepage

You can use instance of \Magento\Framework\App\Request\Http in your class constructor. If you are in a controller you don't need to do it. You can already access it like this $request = $this->...
Baharuni Asif's user avatar
2 votes
Accepted

Magento2 check in template if page is homepage

If you're checking which page is the homepage from your template then you're approaching Magento templating and layout incorrectly. My approach generally is to create a block of type core/template ...
philwinkle's user avatar
  • 35.8k
2 votes

CMS Home Page layout issue

Make sure that the layout of your cms page is 2 columns left and not 1 column (check in the admin). If it still not shows up properly, then it is a coding issue, so look in page/template/2columns-...
Claudiu Creanga's user avatar
2 votes
Accepted

Home page is not Displaying

Most likely caused by a missing configured home page. To fix that, go to the backend under System > Configuration > Web > Default Pages Change the store you're working on using the scope dropdown at ...
Raphael at Digital Pianism's user avatar
2 votes
Accepted

$this->getIsHomePage() - Fix for Store Views

It's a bug. I think you're getting bitten by the same issue this guy is: 'Is home page' condition with different store views in magento not working Replace your homepage check with this: <...
SamC's user avatar
  • 349
2 votes

How to display a timer countdown from a static block

Create a .phtml file in your theme. The path would be: app/design/frontend/YourPackage/YourTheme/template/yourphtml.phtml And paste that HTML and PHP code over there. And in the cms block write ...
Murtuza Zabuawala's user avatar
2 votes

Magento 2: Display list of specific categories on Home Page

Better idea create a custom module for this. This module must have below files: app\code\[VendorName]\[ModuleName]\composer.json app\code\[VendorName]\[ModuleName]\registration.php app\code\[...
Amit Bera's user avatar
  • 77.5k
2 votes
Accepted

how to display recently viewed products on homepage in magento 1.9.3.3

Make sure your block is whitelisted You can make block whitelisted from your admin panel in System > Permission > Blocks Add new entry if not present say for example reports/product_viewed and ...
Priyank's user avatar
  • 7,682

Only top scored, non community-wiki answers of a minimum length are eligible