I am trying to include the Redux Framework in my theme. I decided to try the online builder of Redux Framework: http://build.reduxframework.com/ to generate the necessary files for me.
The builder of Redux provides two options:
(1). To generate and export the admin folder.
(2). To generate and export a starter theme with the Redux settings.
I think i need option (1) since i have a theme already in my hands.
The admin folder contains the following:
(1). The Redux Builder generated (.Json) file.
(2). The admin folder itself - which contains the framework and extensions folders along with two (.php) files: (admin-init.php) and (options-init.php).
The documentation of Redux Framework teaches us how to load the config file of the framework inside our theme. It does not inform us through what to do with the exported admin folder and how to use it in our theme - in case we chose to use the online builder.
The online builder of Redux framework states the following:
Download just the admin folder portion. This will provide you with a
folder you can place in a theme or plugin and include
~/admin/admin-init.php to initate it.
Side note: It is written as "initate" instead of "initiate". If any of the developers happen to read this question, it may be a nice thing to correct this small typing mistake.
My Question:
(Q1). How should i initiate the admin file? I couldn't find that in the documentation. Is it about copying its content to the (functions.php) file after fixing the directories? Or something else is required?
Include the Redux framework.
Copy the generated admin folder to your theme.
Copy the contents of admin-init.php to functions.php file of your theme.
Fix the directories names and files depending on your theme's structure.
Is that right or i am missing something up there?
Any clarifications, answers or comments will be greatly appreciated.
Thanks in advance for your help!
There is another way to initiate, i don't know if it's the best way or not
in my themes, i add :
require get_template_directory() . '/admin/admin-init.php'; )
in my function.php so i don't have to fix the directories files and names in redux admin folder depending on my themes.
Lead dev of Redux here. Good call on the spelling check.
Just include that file and that's it! :)
Related
I would like to customize view.php file which is the core file of moodle, since modifying it in core is not good practice I would like to modify it from my theme,
By default there is a cool theme, I just copy pasted the course directory into it and Try to customize it but moodle is not recognizing my directory.
What is the procedure to do this kind of customization, I check this link but unable to follow it since I don't understand. Can any one help me here about it?
Despite the fact that there are several view.php files, which one do you want to adapt?
Please note that you cannot simply overwrite for example course/view.php in your theme. You have to override the specific renderers, see https://docs.moodle.org/dev/Overriding_a_renderer
To override an url in Moodle you may use custom scripts. However if it's a matter of a renderer you should try overriding that first.
I am currently using the Redux framework embed in my theme.
My theme only load the po and mo file using load_theme_textdomain but the translation doesn't seems to take effect for the options I created for the redux framework.
Is there anything else I need to set in my functions.php file to make the translation apply to the options I created in the options-init.php?
Thanks in advance
Lead dev of Redux here.
You need to load your text-domain and before you run Redux. ;)
I am developing mobile application for existing magento website and the mobile application has its own web admin and web admin developed in core php (not in magento). Can we put the core php web admin code to magento /app/code/local/ folder ? and is it work with magento ?
Please help me on this.
We can consider Magento as an application that is constituted by modules. Each of this module does different functionalities, but still they are independent to each other. This property makes Magento highly extendable and powerful.
By default, Magento comes with lot of such individual modules. These modules are located inside app/code/core. Note that, this folder only holds Model and Controller logic parts. View logics are separated from this and it normally lies in app/design and skin folders.
If you need to extend Magento core functionality or if you need to add any new functionality, you have two options available.
Use an extension
Develop your own custom modules
For extension/pluggin, Magento uses app/code/community directory. This way core modules are seperated from extensions and it gives us lot of flexibility.
When you use your own modules to add any functionality, you probably need to add your module in app/code/local. This way, custom modules are seperated from both core and extensions.
When Magento looks for a module, it will first check that module in local directory. If it is not there, then it will check in community directory. If it is not there, again it will check in core directory. Finally it will check it in lib directory. This callback mechanism is the core concept that you need to understand , before start to develop your own extensions.
It is not necessary to put your custom module in app/code/local directory. You can put it in community or in core directory. This is because, the callback mechanism can pick up your module, irrespective of these three locations. However as I said earlier, three of this directories has its own purpose. So better use them properly as it demands.
Hope that makes lot of sense
From Magento Wiki,
Every custom module will be created in the directory:
/app/code/local
And this is the directory structure that you use to create one:
/app/code/local/<Namespace>/<Module>/
That way, we can have multiple modules under a single namespace.
Naresh, /app/code/local/ is used to put your custom developed plugin/extension for magento. it's main aim to have custom developed code and core code separate.
If in future you upgrade the version of magento than it overwrite/delete the code written in /app/code/core/ but leave the code as it is in /app/code/local/ and it's place where you can override the core block/helper/model as well.
you can't copy your code directly in to core, you have to create module/plugin to club your existing code with magento.
I have gone through Yii documentation and successfully implemented two different themes for back end and front end of the website. Yii doesnt have good themes and I found themeforest having awesome bootstrap themes. So I installed Yii-booster and downloaded a themeforest theme with bootstrap support.
I was wondering how to integrate it?
1)Do I have to make a new folder in themes folder, and replace css,js, images folder in root
directory
OR
2)Replace the js,css and other folder/files at path protected/extensions/bootstrap/assets
OR
3) Any other way ??
Apply a simple logic. Just copy the theme and make particular layout ,then call the layout in the controllers according to your need.
I want to develop WordPress themes and plugins. What do I need to know to do this?
I have knowledge of PHP, HTML, CSS and JavaScript. I have developed a few projects using these. What is the best place to start (except Codex), is there any book? Where can I know how the core of WordPress works?
Check out this neat infographic for a good introduction to the anatomy of a wordpress theme.
http://yoast.com/wordpress-theme-anatomy/
Professional WordPress Plugin Development
Digging into WordPress
For Plugins:
There are two places where you can code for plugin in Wordpress.
1. functions.php
2. Create a folder in plugins folder, inside that folder. Create a blank .php file, and code there.
For Themes:
As you asked for learning wordpress themes. Go to themes folder, try to get the structure and flow of wordpress default themes.
You've to code within themes folder.