How to edit the WooCommerce shop page - php

I have copied the WooCommerce files from my plugins file into my theme file so that I can edit / overwrite them. Now I want to be able to find the html files so I can remove certain sections like the search bar and page links in the sidebar. I also need to find the html as I would like to make this plugin work with bootstrap. Which files do I need to find to make these kinds of changes?
I've tried looking and all I can find is php code. Or is this not the way I should be trying to achieve this? Thanks
This is what I'm getting by default as you can see all of my page links are in the sidebar along with a search bar.

Related

how to make a product image clickable and redirect to product details site in wordpress/woocommenrce/uncode theme

I couldn't find a tutorial or hint regarding making a product image in the wordpress theme "uncode" clickable. when clicking on the product image, it only opens the image in full size but doesnt rather redirect to the details page.
I assume it isn't a big thing that needs to be changed/added, but finding it seems quite difficult, as I have no experience regarding this theme at all.
thanks upfront!
EDIT: What I am trying to find out, is how to make this (tutorial for another theme https://slocumthemes.com/2015/10/how-to-make-woocommerce-thumbnails-clickable/) for my theme, uncode.
can anybody help? I think I found the line of code in one of the php files, but I have no proper experience of php
You can override woocommerce template.
Create a folder named woocommerce in your uncode theme and further corresponding folders where relevant file is added in woocommmerce plugin. e.g woocommerce/templates/single-product/product-image.php.
In that overridden file you can customize the HTML i.e link your image.

What php file is the div class="woocommerce-tabs wc-tabs-wrapper" located in WooCommerce?

I'm attempting to rearrange the layout for my WooCommerce pages, specifically the individual product page but I can't find where the HTML code is. I'm looking for:
<div class="woocommerce-tabs wc-tabs-wrapper">
I've had a search using my text editor across all available files and it cannot be found but it's very clear that it is in the inspected elements. Is there somewhere I can find it or do I just have to override the whole thing? If so, how?
If you want to design the pages of WooCommerce copy the folder plugins/woocommerce/templates/ to your theme folder and rename it 'WooCommerce' would be: themes/mytheme/woocommerce. That way you can modify the templates and update the plugin changes are not erased.
For more information read here

How do I use an Inspector to find the HTML in a theme's PHP files?

I'm working on a Wordpress website for someone and I have a question. I used an inspector (firebug) to check out the html of my site but I need to know where to find that bit of code in the Wordpress theme (Spacing) php files. There's no search all feature and going through all of them separately is ridiculous.
I really appreciate any help you can offer!!
I found an article on it (https://wordpress.org/support/topic/search-through-php-files) but there really wasn't a solution. If I can find what I'm looking for in the HTML (it's a menu name by the way), why can't I go find it in the theme files??
I don't know if this matters but the HTML is a body class to a couple of div classes to a ul id to li id to an a class.
WP does not contain ant HTML page. Everything in WordPress php file. If your page is created in page section you have to check in page.php file in /wp-content/themes/{your theme name}/page.php or if your page is posts you to check in post.php
What you want to change in WordPress site ?
If you go into the back-end/admin section and click "Pages". Find the page you are working on and click edit. In the "Page Attributes" you can see what "Template" it is using.
Then you can find that template in /wp-content/themes/yourtheme/
EDIT: More than likely the header and navigation is located in the "header.php" file in the themes folder.

Wordpress plugin using existing theme

I am building a plugin for the first time and I have setup my rewrite rules to call a PHP file I have located in my plugin folder and this is working but all I have it output just now is "test"
I wanted to ask, is there is a way of pulling in the existing theme and using this as the basis for the page, then I can have my plugin just output the page content area so to speak.
My plugin is quite big in terms of the amount of data it handles so I would like to be able to use a menu link to the aforementioned file and this file can then output all the sub pages of content but still using the default theme (theme I have made) and fill the content area only is this possible and if so is there anything to explain this already available because I couldn't see it.
Any help with this would be much appreciated.
Edit: I have tried including a file from my current theme but this will give me a 500 error so I assume its not as simple as this.
Have you thought about using custom post types for your plugin content rather than relying on custom tables and separate code?
Other than that, you could use a shortcode (just one) and have users insert that into a regular WP page, the shortcode then displays all of your various plugin stuff.
It's hard to be more specific without understanding why you've done it this way.

wordpress use in own template

I've created an HTML page as part of my website which I would like to use as a template for news articles. The page has all the things it needs, it just needs to display the correct news article in it.
I installed WordPress on my webserver and now wonder how I can have wordpress publish articles using my HTML page?
Is this even possible since WordPress works with php?
thanks
What you are talking about is themes. Wordpress allows you to create a theme for your installation so it displays using your html/css (more or less)
The way I do this is copy the default theme and make changes in there, and then you can switch to your new theme in your settings.
Edit: in addition, you can also load up wordpress on any page using:
include( '/path_to/wordpress_install/wp-load.php' );
This will allow you to use wordpress functionality on any page of your site.
just edited the single.php file by pasting the desired html code and leaving the loop code there where the text needed to show up.
didn't need to break up the page in a header, body and footer. Left out sidebar for now, but will put it back after I edit it properly.

Categories