theme-customisations's Introduction
=== Theme Customisations === Contributors: jameskoster, woothemes Tags: theme, edit, edits, customise, customisation, customize, customization, css, php, jquery Requires at least: 3.0.0 Tested up to: 4.5.2 Stable tag: 1.0.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html A handy little plugin to contain your theme/plugin customisation snippets. == Description == Think of this plugin as an alternative to adding code snippets to the functions.php, or style.css file in your child theme. Why? It keeps all of your changes in one location, independent of the other components that make up your web site. That means you can safely perform theme / plugin updates without the worry of losing your modifications as well as easily deactivating your customisations to check for conflicts. *Note:* This plugin doesn't actually do anything on its own. It is purely a convenient place for you to store your own theme/plugin customisations. == Installation == 1. Upload `theme-customisations` to the `/wp-content/plugins/` directory 2. Add your customisations to the plugin either locally or via Plugins > Editor in the Dashboard 3. Activate the plugin through the 'Plugins' menu in WordPress 4. Done! == Usage == * Add any CSS snippets to `custom/style.css`. This file is found in this plugin. * Add any PHP snippets to `custom/functions.php`. This file is found in this plugin. * Add any jQuery snippets to `custom/custom.js`. This file is found in this plugin. * Add custom top level template files (page.php, single.php etc) to `custom/templates/`. You will need to create the templates folder. * Add any WooCommerce template files to `custom/templates/woocommerce`. You will need to create the templates and woocommerce folders. * Activate the plugin. == Frequently Asked Questions == = Isn't this what child themes are for? = Well, kind of. Sure, you can put your modifications in a child theme, but there are many places (including woothemes.com and wordpress.org) to download and use child themes. If you decide to use a child theme built by a third party and make modifications there, you would lose them when performing updates. Also if you make all your modifications in your own custom child theme then realise that you want to use a child theme from your favorite theme vendor, you'll have to move all of your modifications somewhere else. To avoid that hassle, use this plugin. = What templates can I override via this plugin? = As you know, to override a parent themes template file via child theme you can just copy/paste it into your child theme. This is the one drawback of using this plugin - you can only override top level templates - not template partials. This means that you could add a `page.php` template file to the `/custom/templates/` dir of this plugin and it would work fine. You could not however add a `header.php` or `footer.php` template file. Those would not work. = Should I put all my customisations in this single plugin? = That's entirely up to you. There's nothing to stop you from duplicating this plugin and changing the name. That way you could theoretically keep each of your customisations in their own individual plugins. This can be very handy when debugging, or if you want to quickly enable/disable a specific customisations temporarily.
theme-customisations's People
Forkers
sivaraj87 maxamillion32 hlashbrooke 1wdtv dariodev patosand art2u brianbam 4mbit khomenkov bbatchelder leemurray123 burlesonbrad fernando772 yosemite4 mrfoxtalbot antonywu dyrobin tseng256 fervous patricmutwiri hanspeterhauser swise82 brendannoble jezmck leokoo alexx855 connect4brian richlord romarck acribis trebacz danybr0 becc-mu auke1810 xturgorex theperfectwill sebastianschlag curious-ways mausarde markll jdavidthomson anagnostou74 martinhalik ereuse corbax ksaltik simongcc aleua concepx nicolaerario jazzi olderfisher pavlo-bondarchuk greenbuks salomalo jalyssamac fluential bfrankhall webdevid prin ulimc flcr topoutchris benpropulse neps-in albertkp agung-wete hughfuve mauricioperera frankli-dev codersaiful atr0x23 j1g4rsh4h dnassaro isabella232 mkanev swdec macieopi dominique-w spagi k0s0lapiy darkthrone nizor stonerea656 artisans1982 nomadical1 bryon-czoch costosis xanderyeng ohmdios rolltidehero draganfsd slipsnip russellkaye bytebeans racmanuel good886 sumivirtina rabinkumarpaltheme-customisations's Issues
Location of editable files
I think that it would be helpful if in your documentation that you were more clear on where to edit these files (i.e style.css). I did find them inside the plugin, but for a little bit I was wondering where I was supposed to place the files you listed
- Add any CSS snippets to
custom/style.css
. - Add any PHP snippets to
custom/functions.php
. - Add any JS snippets to
custom/custom.js
. - Add custom top level template files (page.php, single.php etc) to
custom/templates/
. - Activate the plugin.
Maybe you can just add to this, "these files are located inside the plugin"
Also, I don't see a templates folder inside the custom folder so I'm supposing that we are to create that folder and then add something like page.php inside it?
Thanks this plugin is helpful and I don't know what I'd do without it when using the theme proshop with storefront. It's like I'd need a child of a child theme option.
can't activate 2 copies of this plugin at the same time
Hi can anyone help please?
I have two copies of this plugin.
I have one of these plugins active (with part of my custom css).
I want to activate the second plugin with the rest of my custom css (trying to separate my theme css from my woocommerce css), but I get this fatal error:
Fatal error: Cannot redeclare theme_customisations_main() (previously declared in /home/content/33/8318333/html/wp-content/plugins/GALLERIA-customisations-master/theme-customisations.php:111) in /home/content/33/8318333/html/wp-content/plugins/WOOCOMMERCE-MY-customisations-master/theme-customisations.php on line 112
I'm guessing this is a simple fix? - do I need to change a line or add a word to make these plugins render as different plugins?
Please help. :)
Adding a template for custom post type
I understand that I can only override top level templates with this plugin, and not template partials and that's fine for my current project.
However I was hoping to be able to add a template for my custom post type, like single-mycpt.php but that doesn't seem to work.
Am I missing something? Are these not top level templates?
Is there any workaround?
Thanks
Problem when trying to save a draft post
Hi,
When I try to save a draft post, I get the following errors:
Warning: Cannot modify header information - headers already sent by (output started at /home/notany5/public_html/wp-content/plugins/theme-customisations-master/custom/functions.php:36) in /home/notany5/public_html/wp-admin/post.php on line 197
Warning: Cannot modify header information - headers already sent by (output started at /home/notany5/public_html/wp-content/plugins/theme-customisations-master/custom/functions.php:36) in /home/notany5/public_html/wp-includes/pluggable.php on line 1167
And when I try to add images from the gallery, the images do not show. I have to deactivate the Theme customisation plugin for everything to work.
The plugin was working fine but it suddenly happened without updating or changing anything!
Please help.
Product images no longer showing when theme customization is activated
As soon as I activate theme-customisations (without any code changes) the product images on the product page no longer show. I can click where the image should be and they open up. As soon as I disable the plug-and reload the product page the images appear.
This is my first issue submission so I apologize I didn't include the required information.
My current set up:
Wordpress up-to-date
Woocommerce up-to-date
Storefront up-to-date
using the child theme Boutique
Issue with Theme "Themify Ultra"
Hello :)
I am using the Themify Ultra Theme.
If the theme customisations plugin is activated, there are some issues:
- half of the Header has transparent overlay (see Picture)
- It is not possible to "Turn on builder", which is necessary to modify the pages/design
Is it possible to check this issue?
Thanks!
Jo
How to open the plugin
Hello,
I am probably missing something obvious here.
I have installed and activated plugin, but I cannot find it in the Wordpress menu (where Media, plugins etc are listed to the left).
So how can I "open" the plugin so I can start adding code to it?
Thanks!
empty .js file
Upload to Wordpress Plugins?
This is a great utility. Please consider uploading it to the Wordpress Plugins so others can download it from within WP.
Template Hierarchy
I use this plugin to customize the theme "storefront", which is woocommerce theme.I found it can't support "Template Hierarchy",am I wrong?
custom/templates/woocommerce does not actually loaded
I have tried to add archive-product.php
It seems that it doesn't loaded.
Force update cache version of style.css
I have a problem.
I delete cache into chromiun and firefox, press F5, press CTRL+R , etc..., but file my file https://mydomain.es/wp-content/plugins/theme-customisations/custom/style.css?ver=4.9.5 is always loading the same (except with new devices), and I made changes on it ( when I download with cpanel the css file is correct, has the changes)
if I try to change manually the option 'ver=' like:
https://mydomain.es/wp-content/plugins/theme-customisations/custom/style.css?ver=4.9.6
then the file is loaded with changes
What is the correct way to force load last style.css file ?
I have read this:
https://wordpress.stackexchange.com/questions/90820/how-to-add-version-of-style-css-in-wordpress
but not sure if I have to change wp_enqueue_style() command into my
/public_html/test/wp-content/plugins/theme-customisations/theme-customisations.php
I have modify theme-customisations.php
/**
* Enqueue the CSS
*
* @return void
*/
public function theme_customisations_css() {
wp_enqueue_style( 'custom-css', plugins_url( '/custom/style.css', __FILE__ ),array(),rand() );
}
and now all ok, the changes into styles.css is always reloaded, but
is this the correct way ?
Issue with custom function
After updating to woo 3.5.4, I noticed in the dashboard, only one of my products in my catalog was returning:
It turns out this function, which I copied from some other site, was causing problems. The purpose of the function is to display the discounted price when a coupon code is applied:
add_filter('woocommerce_get_price_html', 'woocommerce_get_price_html', 10, 2 );
function woocommerce_get_price_html( $price, $product ) {
if ( WC()->cart->has_discount() ) {
$values = array (
'data' => $product,
'quantity' => 1
);
$coupons = WC()->cart->get_coupons();
$_price = $product->get_price();
$undiscounted_price = $_price;
if ( ! empty( $coupons ) ) {
foreach ( $coupons as $code => $coupon ) {
if ( $coupon->is_valid() && ( $coupon->is_valid_for_product( $product, $values ) || $coupon->is_valid_for_cart() ) ) {
$discount_amount = $coupon->get_discount_amount( 'yes' === get_option( 'woocommerce_calc_discounts_sequentially', 'no' ) ? $_price : $undiscounted_price, $values, true );
$discount_amount = min( $_price, $discount_amount );
$_price = max( $_price - $discount_amount, 0 );
}
if ( 0 >= $_price ) {
break;
}
}
if ( ( $product->get_price() > 0 ) && ( $undiscounted_price !== $_price ) )
$price = wc_format_sale_price( wc_get_price_to_display( $product, array( 'price' => $undiscounted_price ) ), $_price ) . $product->get_price_suffix();
}
}
return $price;
}
Any obvious issue or changes that need to be made after the 3.5.4 update?
custom/templates/sidebar.php does not get loaded
i wan't to override the "sidebar.php", so i copied it into the plugin-folder under "custom/templates/".
This works with other template files like "page.php" or "404.php" but not with the "sidebar.php" or any specific "sidebar-{name}.php" file.
I use the "storefront" theme with "proshop" child-theme.
From Wordpress Docs about "sidebar.php" template file:
https://developer.wordpress.org/themes/functionality/sidebars/#create-a-sidebar-template-file
plugin overrides loading parts
As soon as I activate the plugin the loading parts in woocommerce don't work anymore. For example on the checkout page, API page (while adding a key). And I have no idea where else so far. The loading circle just keeps loading for ever, although the function behind it is doing its job (API key is added on refresh for example).
Template overrides?
What about theme/template overrides? Perhaps there is a way we can make the plugin modify the order WordPress looks for overrides to first check this plugin folder for the overrides and then proceed with the usual order of checking?
Create a zip file to install. Put it as github release.
This isn't bringing in my custom css last....
It's bringing it in first. Is there anything I can do to override that? Or am I perhaps doing something wrong? http://deflategatehats.com
(In desperation, I've started using !important in my custom stylesheet. I know that's not really an answer.)
Removing storefront sidebar not working
Hi There,
I installed this plugin and added the following code to the custom/functions.php, but it's not working. It works in child themes, so I'm at a stand still with how to figure out why this isn't working.
remove_action( 'storefront_sidebar', 'storefront_get_sidebar' );
Any help is appreciated. Thank you.
~Abbey
Wordpress 5.0 error after installing plugin
I just tried installing the plugin to change the Storefront Woocommerce theme in WP 5.0, but after uploading the file and activating the plugin, the following error appears when I try to load any page in my site:
Warning: require_once(custom/functions.php): failed to open stream: No such file or directory in /home/nacional/public_html/wp-content/plugins/theme-customisations.php on line 34
Fatal error: require_once(): Failed opening required 'custom/functions.php' (include_path='.:/usr/local/php71/pear') in /home/nacional/public_html/wp-content/plugins/theme-customisations.php on line 34
I had to go into cPanel and manually delete theme-customisations.php for my site to go back to functioning.
Please update for most recent version of WP and Woo
Hi,
Please update for most recent version of WP and Woo.
Please do not abandon this like the rest of the outdated code snippets found all over the internet.
Thanks
Modifying style.css and nothing happens?
Hello, I love this plugin, makes it a lot easier than having a child-theme.
Whenever I modify functions.php it works very well, but nothing happens whenever I edit style.css.
I tried adding this code.
.storefront-primary-navigation{clear:both;background:rgba(0,0,0,.0)!important;margin-left:-99em;margin-right:-99em;padding-left:99em;padding-right:99em
}
Anyone mind helping? I'd love to use style.css but it doesn't want to cooperate with the site.
Thanks.
.php file customations in folder templates/woocommerce does not work
Hi,
I tried to add content-single-product.php
file in the custom/templates/woocommerce
folder and it does not work. So the full path is /htdocs/wp-content/plugins/theme-customisations-master/custom/templates/woocommerce/content-single-product.php
I have tried every permeation and it does not work. Please assist
Thanks PicFlick
Add template file to theme
Hi,
It seems that currently this plugin can only override an existed file(like page.php, single.php, etc.) in the theme/childtheme. However, sometimes some template file like image.php or attachment.php does not exist by default but it needs to be added for customization. What do you think of this feature? Is it possible to implement it?
Is this plugin abandoned?
Greetings, as stated in readme this plugin requires at least WP 3.0.0 and is tested up to 4.5.2. We have WP 6 out now and the plugin has not been updated for 5 years. Is it compatible with latest WP? If not, are there any open source alternatives? Thank you.
Error
Wordpress 5.2.2
WooCommerce 3.7.0
Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.
hi james - trouble with install
i uploaded the theme-customisser.php file in my wp-content/plugins directory but when i went to the plugins editor in my wordpress dashboard it wasn't showing up. just the usual askimet and woocommerce files were there. was there a .zip file I was supposed to download somewhere. I'm new to the coding and wordpress world. i called godaddy (my host) and the tech said that there should maybe be a folder with some other files in it like licensing....etc.
Plugin causing error
Notice: add_shortcode was called incorrectly. Invalid shortcode name: Empty name given. Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.) in /home/dh_3dcjr6/clothing-by.me/wp-includes/functions.php on line 5225
Warning: Cannot modify header information - headers already sent by (output started at /home/dh_3dcjr6/clothing-by.me/wp-includes/functions.php:5225) in /home/dh_3dcjr6/clothing-by.me/wp-includes/functions.php on line 6270
Warning: Cannot modify header information - headers already sent by (output started at /home/dh_3dcjr6/clothing-by.me/wp-includes/functions.php:5225) in /home/dh_3dcjr6/clothing-by.me/wp-admin/includes/misc.php on line 1310
Warning: Cannot modify header information - headers already sent by (output started at /home/dh_3dcjr6/clothing-by.me/wp-includes/functions.php:5225) in /home/dh_3dcjr6/clothing-by.me/wp-admin/admin-header.php on line 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.