How to use the code which should be used in more theme's files
I'm speaking about such kind of code as menu, footer, header, sidebar. You can't put the code in all files where you need. Midrub has a feature, called parts which allows to work with this kind of the code.
So, how the parts works? Create a directory in your theme contents/parts and put there files with code which should be used in more files. After this, use the function get_theme_part to include the file.
How the function get_theme_part works? Supposing you have the file menu.php and header.php, you just have to write this code:
- get_theme_part('menu') - to include the menu.php
- get_theme_part('header') - to include the header.php
With get_theme_part you can easy create a professional theme for Midrub Frontend.
- How to enable or disable the widgets in the Midrub Dashboard Component
- How to create and use coupons codes in Midrub
- How works the referral program in Midrub
- How to configure the affiliate program in Midrub
- How works 3D secure for Braintree payments
- How to create and use the Stripe's webhooks
- How to manage the subscriptions on Braintree
- Send automatic templates in Facebook Messenger
- Apply coupons codes for the plan upgrade or renew
- How works the fields and options in the Midrub Payments system