i am trying to edit the single-product template of my website but this file seems to be lost or hidden as i show you below:
As you can see on folder's root there are no such file neither in the other folders. So i found a plugin that tells me what template is the current page using (What The File) , so i go to my single product page and check and voila:
You see that there's a template called: taxonomy-product-cat.php but it's nowhere!
I have set my settings to show all hidden files but still i can find this template.
Can someone help me find it please?
That file is not in your current theme. It can be found in WooCommerce plugin.
Look here: https://github.com/woocommerce/woocommerce/tree/3.8.0/templates
Or read more about WooCommerce Template structure & Overriding templates via a theme
Related
Created a page
The address bar says digitalelectronics.ru/elementor-7/. But there is no such folder in the site. Tell me which file contains the template of the file displayed in the browser under the address digitalelectronics.ru/elementor-7. Looked at a temporary file (needed, searched)
Then I searched for the file by the text found in the chrome code (see immediately above) -
but found nothing
Tell me how to find the Elementor file displayed in the website builder?
What you are seeing is not a folder, it is the permalink of the post/page. Wordpress rewrites the url path based on your settings:
You can change that slug when you edit a post/page.
Classic Editor:
Gutenberg Editor:
See here for more info about permalinks.
To find out what php template is responsible for the page you are viewing have a look at the template hierarchy. It would usually be single.php if it is a post or page.php if it is a page.
Alternatively you can use a plugin like this one, or similar, that would always show what templates make up the page you are currently viewing.
I am trying to edit a WordPress site. When I try to edit the x.com/blog/ page nothing happens.
I am trying to find out which PHP files are related to set up the blog page, but I do not know how.
If I can find the right files I can edit those. So how can I edit the /blog page in Wordpress?
Open Admin Dashboard and edit page blog page and check which template is currently using for that page.Then go to "/wp-content/themes/[your-theme-name]/" and find that template.
https://developer.wordpress.org/themes/template-files-section/page-template-files/
Alternative you can check if x.com/blog/ is coming from archive page which is custom post type page. You can find it via go to "/wp-content/themes/[your-theme-name]/archive-blog.php"
https://codex.wordpress.org/Post_Type_Templates
Go to /wp-content/themes/[your-theme-name]/. All files which are responsible for rendering the output can be found there.
Most likely index.php, home.php, front-page.php or page.php are responsible. The exact responsibility depends on the structure of the used theme.
Simple drop a
echo "This file is used currently.";
into the top of those themes and check if this appears in the source code if you are reloading the page.
Also make sure that any caching plugins are temporarily deactivated.
The basics on how WordPress themes are made and which template part is called can be found here: https://codex.wordpress.org/Theme_Development
I have my own html to display all products inserted in WooCommerce. But I am unable to show it in my styling. I have searched it but unable to find any good solution.
Please help.
You have to learn about wordpress templates hierarchy that all files how it works?
https://developer.wordpress.org/themes/basics/template-hierarchy/
Suppose You want to create single page of product then create a new file into your theme with name single-product.php then single product url automatically render this file.
As same you want to create shop page (Where all products should shown) then create a file into your theme with name archive-product.php then shop page automatically render this File
For add to Cart functionality there are lots of plugin that can be used.
I am using one page checkout extension,and my firebug is displaying this path..
checkout/onepage/#2.css
but i am unable to find this page,can anyone help me..
Check the view source of your magento checkout page to find the one page checkout css path and file name accordingly.
Or
Check the page.xml file in your current store theme folder to findout the path.
Or
Check your onepage checkout Extension layout file in your current theme to know the path.
I'm trying to edit the checkout page, but can't find the template. What's the location inside plugin, of the file that has checkout fields?
There are several php files that make up the checkout page.
wp-content/plugins/woocommerce/templates/checkout/
cart-errors.php
form-billing.php
form-checkout.php
form-coupon.php
form-login.php
form-pay.php
form-shipping.php
review-order.php
thankyou.php
wp-content/plugins/woocommerce/templates/checkout/form-checkout.php is the main file.
[Template Structure from Woo Commerce Docs][1]
http://wcdocs.woothemes.com/codex/template-structure/
https://docs.woothemes.com/document/template-structure/
It's recommended that you copy the template folder It's recommended to copy over the template folder with the files you wish to change from the woocommerce plugin directory. Put it at the root of your theme and rename it to woocommerce (leaving the template folder intact in the plugin directory to allow for upgrading).
Be careful of your cart template which is by default the page.php template from your general theme.
You can change the cart layout by changing the page.php, or go to your WordPress cart page, edit and change the template for an other one.
Hope it helps, I just wasted 2h searching that.
There are a set of several templates that control the checkout page. They can be found in the WooCommerce plugin folder in templates/checkout.
You can put a woocommerce/templates/checkout folder inside your theme's folder and copy the templates you want to alter into it. Those will override the normal templates without altering the plugin itself. That way your changes won't get overwritten when WooCommerce is updated.
Note: I don't suggest to direct edit on plugin file because if by mistake you updated than you will lost all changes. so first copy /woocommerce/templates/ directory to your theme directory inside /theme/woocommerce/ and
Then you should edit files in theme/woocommerce/checkout/
Refer more: https://docs.woocommerce.com/document/template-structure/