Get access
Join our free trial

About Framework

This documentation will help you with the Mega Lite framework which is a simplified version of Mega framework.

Folder structure & filenames

Folder structure and filename glossary can be found on the codex lite section.

Installation instructions

Full installation instructions are available here.

Upgrade instructions

For now the upgrade process must be done manually, we are working to automate it. To upgrade your theme, you have few options, you can re-upload the full theme version that was provided to you in .zip file from the members area, following the installation instructions above, doing so will overwrite any changes you have done to your theme files. Another option is to apply a small snippet of code that will upgrade the theme without modifying any important files. If you need any help or afraid to destroy any modified files, you can ask support for an assistance.

How sidebars & widgets work

Each theme can come with different set of sidebars. Sidebars are widget-aware areas where you can drag and drop your widgets in. To see what sidebars & widgets your theme offers, go to the widgets interface which is located at Appearance > Widgets. All the widgets that are being provided by MegaThemes are numbered and can be instantly spotted at the top.

How blocks work

Blocks consist of two groups, draggable blocks (widgets) and non-draggable blocks. Each block can have different settings and configurations. All the settings of the blocks are located at the WordPress Customizer (Widgets can be modified both at the Customizer and widgets interface). If a specific block has settings in it, then it will also have master settings for it in the settings interface. The master settings for the related block will control the block’s default settings.

Available blocks

Detailed block information can be found on the codex pages linked below.


  1. About
  2. Posts
  4. Copyright
  5. Timeline
  6. Login
  7. Register
  8. Newsletter
  9. Contact
  10. Contact Info
  11. Ads
  12. Map
  13. Tabs
  14. Follow
  15. Follow: Counter
  16. Feature: Auto
  17. Feature: Custom
  18. Feature: Image


  1. Meta
  2. Rules
  3. Logo
  4. Paginate
  5. Content
  6. Breadcrumbs
  7. Meta Cats
  8. Meta Tags
  9. Slider
  10. Category/Tag Description

See also How to create a block.

How to edit a certain block manually?

Open your theme folder and navigate to: mega > inc > blocks.
Here you will find the non draggable blocks. However if would open the ‘Universal’ directory you will see the draggable blocks (widgets).
Open up the necessary file for editing, there you’ll find a bunch of code, look up for:

	public function block()

Or in certain cases:

	public function callback()

In those two class methods you can modify the output of the block, be very carefull with what you’re editing.

You’ll also find the following code inside some of those functions:

extract( [\'settings\'] );

This is responsible for extracting any settings to their corresponding variables.

So for example, in the ‘Logo’ block we have a setting called ‘Type’ which can be an Image or Text, and in the block file called Mega_Block_Logo.php we will have a varriable called $type which is storring the value that we choose in the setting ‘Type’, this variable wouldn’t be present unless the extract( $this->mega['settings'] ); was omitted.

The ‘callback’ method is a wrapper method for the ‘block’ method. Usually you’ll only see the ‘block’ method inside a block class, that’s because the ‘callback’ method is storred inside the class Mega_Block which is a parent class of every block, and unless a block has a callback method itself, then the parent method ‘callback’ will be used instead.

The original ‘callback’ method is a wrapper method and will do things like outputting the block wrapper html and block titles, anything else is sent to be outputted within the block method — unless a certain block avoided this re-route and done all its operations within a child ‘callback’ method.

Best practices to edit your CSS files

Generally speaking, editing css files is not recommended, upon update of your theme all css files will be overwritten by newer versions and your changes will be lost. The best practice method is to either use one css file where you keep all your changes and link to it, or use the integrated custom css setting which allows you to keep your css changes in your database.

When you want to edit a specific css rule, all you need to do is copy that rule to either the custom css setting, or the custom css file where you keep all your css changes.

How CSS is structured

Although this is a bit off the scope of this documentation, we’ll cover it briefly. css consists of rules, properties and values. Rules target a specific object, properties define the characteristics of the change, and values define the change itself. Most properties accept one value, while others accept multiple ones. Here’s an example of how it’s done:

rule {
 property: value;
 property: value value;
 property: value value value value;

.logo {
 color: black;
 padding: 10px 20px;
 margin: 10px 5px 15px 20px;

How to translate my theme?

There are two sets of translations to be done in the theme, the first is within the ‘mega’ theme framework itself, the correct folder is located: mega > lang, here you’ll find the full translation template file for you called mega.pot, you can create new language translations from that file, you can share your translations with us if you wish and we will implement that in our framework for future themes to come.
The other directory for translation is located at theme > lang, there you’ll find a .pot file as well, any translation here is theme specific.

How to edit the CSS files?

Open up the folder theme > assets > css

Here you’ll find a lot of .css files, each has a specific name corresponding to the belonging block. for example class.Mega_Block_Follow

We encourage you to create a child theme and override any css there.

Recent Comments



    • No categories