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.
- Add Api permissions from your apps or components
- How to send email in Midrub and how understand why you're emails aren't sending
- How works the Quick Scheduler to publish posts with several clicks
- How to create a new menu for the user's panel
- the_db_request in midrub frontend themes
- Midrub Core Introduction
- Midrub User Introduction
- How to enable or disable apps and components for a Team's member
- Midrub Apps Structure
- Midrub Team Introduction