My question is simple, I have avada theme installed on wordpress and I use woocommerce as my plugin, the question is: how can I have those 3 fields one under the other?
Billing address, Shipping Address and Review & Payment not to be on columns (steps) like is now.
Here is a print screen to see how I see the columns now. Thank you in advance :)
Step One: Download Filezilla
To achieve your goals here, you are going to need to access your web files, on your server. One of the ways you can achieve this, is by downloading FileZilla. Once downloaded, you can enter your login credentials on the opening screen, to access your web files. Unfortunately, this method is not the most secure. Follow this article, which shows you how to access your webfiles, via Filezilla, more securely. It looks more complicated than it actually is.
Step Two: Create a Child Theme
Once you are all logged in, you are going to need to create a Child Theme. What you are doing here, is essentially creating a series of overrides. When someone heads to your website, the Parent Theme loads in the background and then the Child Theme loads, overriding the desired Parent Theme files, prior to displaying the content in the browser.
You can edit the Parent Theme files directly but this would not be a good idea. Firstly, it will be more difficult to resolve any errors, should you make a mistake. Secondly, any edits you create will be removed whenever you upload any Theme updates. As good practice, you want to leave the Parent Theme files alone and only place your own customisations in your Child Theme.
Step Three: Create your overrides
Your next step, is all about creating your overrides. To find the location the files you will need to override, head into the following file directory:
wp-content > themes > theme-name > woocommerce
Drag and drop the 'woocommerce' folder onto your computer. This will not remove the 'woocommerce' from the Parent Theme, so do not worry about that.
Then head into your Child Theme and drag the 'woocommerce' folder into your Child Theme.
Step Four: Alter the information
Due to every theme being different, it is not possible for me to tell you exactly which WooCommerce file needs to be edited here or where in each file, you need to place your modification(s). As an educated guess, you may need to edit files such as:
form-shipping.php
form-billing.php
review-order.php
payment.php
payment-method.php
form-pay.php
Focusing on the WooCommerce files you dragged and dropped to your computer, you will need to open each file, using a piece of software, such as [Notepad++].4 Simply right click on each file and select 'Open with Notepad++'. You will then need to spend a little time identifying which file and where in that file, you need to perform your modification(s). When you do each modification, simply drag the file back over into the 'woocommerce' folder within your Child Theme and refresh your browser to see if the changes have occurred. This will require some trial and error.
Step Five: Deleting unmodified files
Once you have successfully achieved your goal(s), delete all of the 'woocommerce' files, within your Child Theme, which you have not modified. This will ensure that the only WooCommerce files, in your Child Theme, are only those which you have modified.
Related
I have added two custom written functions to my wordpress code.
One of them uses the add_action() and the other uses the add_filter() function of wordpress.
After deploying the code, both functions work as expected, but after some time (I am not sure how long it takes and what causes wordpress to do so) the code just magically disappears from the file.
I am now wondering
Why is this happening?
What can I do so that this won't happen again?
Thanks for your help
Hey you just mentioned that you've added code into /wp-includes/functions.php file. You've used action and filters that's good but your code should be go into active theme's (child theme is the best practice) functions.php file. Files under /wp-admin/ and /wp-includes/ get updated automatically from WP when new update is available (based on settings you have done on your WP setup you can ignore updates as well).
So, your code must be removed by update. Files were overridden by updates. If you have backup copy those code and put it into active theme's functions.php file /wp-content/themes/yourtheme/functions.php is the correct file where you can add the code.
If you have added code into theme's functions.php file make sure you didn't get theme updated otherwise you may lost your work as well that's the reason you can use the Child theme. You can learn how to create child theme here: https://developer.wordpress.org/themes/advanced-topics/child-themes/
Why is this happening?
Most probably because someone updated WordPress to latest version. Before you are going to tell me "but I did not press anything, ever!" please bear in mind, that WordPress updates itself automatically. Especially in the newer versions.
Here is nice article about WordPress automatic updates. It also describes how to turn this off, but I do not recommend doing so.
What can I do so that this won't happen again?
Develop custom WordPress plugin, containing your customizations. Here is nice step by step tutorial
you shouldn't make any changes into wp-includes and wp-admin folders, these folders will update automatically if your wordpress is updated. so if you want to make any changes using hooks and actions you can place the code into your current theme's functions.php. that will work as expected and your code won't disappear.
I'm making a web with a Wordpress and modifying some things with a child and css theme. The problem is that the theme uses a folder with the name "Wp-less-Cache" and inside it introduces a "theme-less.css" that it generates automatically. The problem is that now when I try to modify something by css the my mytheme.css (in the child) does not leave me because it tells me that what I want to retouch belongs to the file "theme-less.css" .... and if I tweak the CSS directly in that, it works but when this file is generated again automatically after a while it deletes the modifications that I had made in it.
I would like to know:
Can you disable the wp-less-cache? it is not in my list of plugins or among the plugin folders ...
Can I do something so that my modifications of the child theme are effective if he is active?
Thank you very much
It is used by one plugin called tlg_framework which is a built in plugin with themes that developed by http://www.themelogi.com/
I have currently manually implemented a tracking code in wp-content/themes/genesis/header.php
The code looks like this (shortened):
<script>
CODE HERE
<?php if (is_single()){CODE HERE}?>
CODE HERE
</script>
</head>
Whenever I upgrade genesis (the Wordpress theme) this code is lost and I have to manually add it again.
How can I add this code via the functions.php to the head section in wp-content/themes/genesis/header.php so that it survives a Wordpress theme upgrade - how would the code look?
You need to use wp_head hook to add content to the <head></head> dynamically.
Your code would look like this:
add_action('wp_head', 'change_this_name');
function change_this_name(){
?>
<script>
CODE HERE
<?php if (is_single()){CODE HERE}?>
CODE HERE
</script>
<?php
};
Generally, the solution for modifying your theme without having your modifications overwritten is using a child theme. But you could also create a small plugin that would do the same thing you want to do here.
Which option you take is generally much of a muchness for now, but if you are planning more changes in the future, you should keep in mind that:
plugins are for adding functionality
themes are for controlling how things look and feel
This might help you decide which option is best to take now (although you can easily do both, or change later if you wish :)).
Option 1: Creating a child theme
Create a new folder in the wp-content/themes folder (name it whatever you'd like to call your new theme), and then create a style.css in that folder.
At the top of style.css you'll need to include defining information for your theme. You can copy the format for this from the Genesis theme, just change the name and other details so it's clear when you go to activate it that this is your theme.
The key here is then to add a new line to this theme info reading:
Template: genesis
That line tells Wordpress that your theme will be a child theme of Genesis, and anything your theme doesn't provide, Wordpress will grab from Genesis.
The key here is then to override only what you want to and let the rest fallback to Genesis.
So, you could copy the header.php and add your code in, but then you'll still need to update the rest of the file if it changes. A better solution would be to create your own functions.php in your new child theme and use the following:
add_action('wp_head', function(){
?>
Enter tracking code here...
<?php
});
This will then hook into Wordpress' head action and print out the tracking code right where you want it, without you having to muck around with the rest of the header.
Of course, once you're ready, go to Appearance -> Themes in Wordpress and you'll see your new theme there. Activate it and check your site!
For more background and tips on child themes you can see this page on the Wordpress Codex.
Option 2: Creating a plugin
If it's just functionality you want to add to your site, you may find a plugin more helpful - particularly because you can change themes later and easily keep your plugin, and you can activate it and deactivate it at will.
You can create as many plugins as you like if there is more functionality you want to add later.
The process is fairly similar to creating a theme above. Instead of creating the new folder in the wp-content/themes folder, stick it in wp-content/plugins instead. Then, create a .php file in that folder (eg. myplugin.php, but you can call it whatever you like), and add the following to the top of the file:
<?php
/*
Plugin Name: My Toolset
*/
(You can add additional information if you wish, more information is available on this page of the Wordpress Plugin Handbook)
Under this, simply place the exact same add_action() code mentioned in the theme option above.
Save your file, go to Plugins in your Wordpress admin, find your new plugin in the list, click Activate, and check your site!
For more background and tips on plugins you can see this page on the Wordpress Codex.
I'm by no means a coder or programmer but i have enough to understand my part and fix small issues or adjust look with basic CSS, and so friend of mine asked me for help and here i am two days later asking you)
There is a Website running Enfold theme which recently were updated and so was lost custom image link at right part of header made by someone-else.
I have restored link code from Cached version of website but have no real understanding how and where to add it back to theme templates. Would appreciate any help, solution, link, advice.
Cheers.
A wild guess, since I don't have Enfold theme (the best would be to ask on the official support), but in your div #header_main in the .inner-container, you had after the #advanced_menu_toggle this piece of code:
<img src="http://vcmt.ca/wp-content/themes/enfold/images/layout/canvas.jpg" alt="canvas" style="max-height:70px;">
Just open the .php file that has the header in it, and paste this code back in. Since the canvas.jpg was located in the /images folder of the theme, that is also gone, so my recommendation is to download the image from the cached version if you can and put it back in the image folder.
Also it would be better to make changes to child theme, so that you can update the functionality of the theme, without loosing any custom added modification, like this site had.
If you're planning on changing the CSS in any WordPress Theme, you want to make sure that you have a child theme installed. The child theme allows you to change/overwrite the CSS and Theme Functions on the theme without losing those changes everytime the theme updates.
You can download the Enfold Child Theme Here:
https://kriesi.at/documentation/enfold/how-to-install-enfold-theme/#why-child-theme
...and if you need to add HTML to the header, you can do so by duplicating the header file from the theme, adding a header file to the child theme, and making your changes in the child theme header file.
Hope this Helps!
Our client is using custom search i.e., Searchperience at present they want to remove the custom search and enable the default magento search. While removing AOE_Searchperience related folders Products are not displaying at all. How can be this solved?
Perhaps you have not removed all the files and there is an XML file that is pointing to a template that doesn't exist.
Are you concerned with the category page or the product page or both?
If everything is displaying on the category page except the products then I suggest you add a quick echo('products would be here'); as the first line of code in the file /app/design/frontend/[your theme or base]/catalog/product/list.phtml
if you can see that string in your shop you know you have identified the correct phtml file and you should check to see if the product collection is populated.
if you do not see the string then you need to work out which list.phtml is being called by Magento. I would search my files for list.phtml but turning on Magento's system->configuration->developer->debug->template path hints (and add block names to hints) will expose which .phtml file is being called and what its block class is - that will help you flesh out if the wrong .phtml file is being used or if it is of the wrong class.
If the correct list.phtml is being called but the product collection is empty then there is something funny going on.
To remedy Magento behaving funny:
log out of the admin area and log back into the admin area
turn compilation off
turn compilation back on
re-index everything
refresh all the Magento caches including the Magento cache and the cache storage
refresh any external caches
try to refresh the page and see if that helped.
If that didn't help, switch to the default Magento theme and repeat the steps above. If the product still aren't there even in the default theme then it suggests there are still some module files getting in the way or maybe the core files have been changed but that would be very odd. Start with the .phtml and the block class (discerned from the debug hints mentioned above and follow the code back until you figure out why the category page has an empty product collection)
If the default Magento theme does display the product then you know your fault is theme specific so turn your theme back on and study the file local.xml very very carefully.