I have created a child theme with a new page template on some test site and I have to integrate this functionality into a live site. My theme folder contains lots of php files, css and javascript and my question is: the live site obviously has an active theme, so am I to just carefully place my files into their active theme? I have got the following
images folder
js folder
twitter folder with php files
header.php
footer.php
functions.php
my-page-template.php
style.css
Can you guide me where to place those files so I don't screw everything up?
Related
The website I am working on has a complex footer that has been created in Visual Composer as a template. Rather than having to drag and drop the template file on every page we would like to hook this file into the footer.php theme file. Does anyone know how this can be accomplished? Is there a shortcode?
I'd like to restrict a child theme to only being visible to me, the admin, for development purposes. Then I can make changes, upload and view them live and on the site without other people seeing those unfinished changes. Once I'm done, I take the affected files and move them to the Parent Theme's folder to make the changes visible to everyone.
Is this possible with some kind of script through functions.php?
And I'm not just talking about enqueuing the style.css file, I'm talking about setting up a complete child theme with sidebar.php, header.php etc. and only have the child theme files being loaded for me, the admin, for development purposes. Perhaps a way to define the child theme directory, embedded inside a condition that checks whether the user is admin.
Thank you :)
There is a plugin that does what you are looking for called Theme Test Drive. I haven't used it before but I think it uses some filters to update the theme at runtime for logged-in admin users.
Essentially, you install your new theme and activate it using the plugin instead of the theme switcher in the admin.
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.
I have downloaded an existing plugin from the web to use in my theme. How do I add it correctly to the theme I am developing without using wp-content/plugins folder?
Depends on the plugin, but you're going to have to extract the functions and add them to your own functions.php file in your theme. http://codex.wordpress.org/Theme_Development#Functions_File
And if the plugin requires css and js files, you need to put them in your theme folder and link to them in your header.php.
http://codex.wordpress.org/Theme_Development#Document_Head_.28header.php.29