4

While developing custom theme when initialized my new theme from content -> theme -> selected my own theme after that my site content are missing.

But when i select some dropdown menu i can able to view the product list page only for some selected menu

enter image description here

  • 1
    Have you deployed static content and cache after theme changed? – Amit Bera Dec 15 '16 at 7:40
  • 1
    I think at development time you have used luma theme and after changes your custom theme parent category and homepage content are missing, right? – Rakesh Jesadiya Dec 15 '16 at 8:40
  • @rakesh your wright same thing happened here – karthick Dec 15 '16 at 9:05
  • 2
    Because luma theme all content are coming from Content -> Widget and if you want to display those content in your theme you have to create widget for this. so its not display for your theme. – Rakesh Jesadiya Dec 15 '16 at 9:09
  • @karthick, Have you understand logic behind your custom theme content not display – Rakesh Jesadiya Dec 15 '16 at 10:20
8

By Default magento 2 with sample data with luma themes used Widget to display static content in homepage and all parent category(What's New, Women, men, gear etc..) in luma theme.

In Luma Themes all static block and Top category page called from Widget. 

You can check widget from

Content -> Elements -> Widget

There are list of widget are available here and all widget are assinged to Magento Luma Themes.

So when we create new theme, Based on parent luma theme, All sample data are missing in our new theme because widget are not set in Our custom theme.

enter image description here

If you want to display content same as Luma theme, You have to create new widget same as Luma theme from widget section from admin.

Or

You have to set static block for your category page and homepage content.

So Problem is not your custom theme but default functionality in luma theme takes static content from widget.

Thanks.

  • How to create page, block n widgets programmatically when creating custom theme, so when the theme changes in,admin respective page should activate and show in frontend – jafar pinjar Sep 25 at 3:13
0

After changing default theme to custom theme you run the this commend

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush

this only your theme contents and blocks indexing

0

On Magento 2.3

After changing the theme, you need to create all the widgets. If you are lazy as I am to recreate all the content in the backend, you can easily change the value in the database.

1) Every theme has a theme_id which could be easily found in the database table theme

enter image description here

2) Once you got the theme_id, open the widget_instance table and update the theme_id in the widgets that you want to move to your new theme.

enter image description here

Cheers,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.