This is pretty straight forward. I've installed the Woocommerce Canvas theme and want to use it to implement an HTML template using the various hooks available. I've set my front-page to be the shop page but cannot seem to find the template which affects the shop page.
I have already tried to change both archive-product.php files, and neither are responding.
Managed to find it myself. The WP Cache plugin interfered.
Related
I am creating a Wordpress custom theme, and I've been having issues with my woocommerce template rendering. Firstly, not all of the pages are showing up (some of them are reverting to the index.php and page.php files). Secondly, for the pages that are showing up (the single product page, the archive products page), the css is not being applied. I have tried everything suggested on the docs (hooks), but I have failed. Here is a link to my github for you to see the file structure.
https://github.com/naderae/elbe-collections
possible issues wuth my code:
my code is not written in the standard wordpress way. I only have three pages so far, index.php, page-about.php, and page-team.php, which work fine. page.php and single.php are empty. thus, my site consists of 2 pages, and index.php.
I've been struggling with this for 2 days, and would really appreciate some guidance of hoe to get me back on track. Cheers
Below is a list of some basic theme templates must preset in theme, more about this in details click here.
index.php
style.css
header.php
single.php
page.php
category.php
archive.php
404.php
I would recommend you to start with some default WordPress theme like twentyseventeen theme or other. These themes will have all basic functionality of WordPress. Check functions.php in the theme folder to customize/add functionality.
for more details about Template Hierarchy click here
Customize WooCommerce
Template structure & Overriding templates via a theme - link
Customizing WooCommerce - link
To overwrite woocommerce css you need to add a woocommerce folder to your theme. And go from there.
Woocommerce will also always use their own templates so the easiest way to change the layout is to use a child-plugin from woocommerce.
I have build my own Wordpress theme and activated Woocommerce. Almost everypage works fine. But my Store and Product pages are not in Container. Also I would like to chanche the positions of sertain items on the Product Page. Theme is build in Bootstrap so I would like to use Bootstrapp to fix my Product page. The biggest problem is that I cannot find the right file to edit... Somebody got the solution?
You can check the site here.
Thanks!!
To build a WooCommerce Compatible theme, you need to edit the WooCommerce templates.
All the WooCommerce templates are located at woocommerce/templates folder. If you are not familiar with WooCommerce templates structure, you can install WooCommerce Template Hints, and it will display the template file name to show you where the content comes from.
To customize the template, please follow the best practices so your modifications will not be missing when you update WooCommerce.
I am developing a plugin for Woocommerce. I thought it would be nice if the plugin looked nice in different themes. So I downloaded a theme and installed and activated it.
So I checked the plugin on the product page. But it wasn't there!
I changed back to some other theme and it showed up again!
So my question is, is this my fault for developing a not-so dynamic plugin?
Or is this the fault of the theme creator?
And what are the possible explanations/solutions for those kind of problems?
Example:
Twenty fifteen:
Other theme:
The elements of my plugin are not there as far as I've seen.
Edit
I am using the woocommerce_after_main_content hook.
Which I do like this:
add_action( 'woocommerce_after_main_content', 'ws_action_woocommerce_after_main_content', 10);
This calls my function which runs a shortcode.
Like this:
function ws_action_woocommerce_after_main_content() {
do_shortcode('[ws_frame]');
}
This shortcode ofcourse has the function with <h1>Hello, I'm here!</h1>
Summary of how my plugin works
My plugin is a designer plugin for shirts (May aswell be for other products).
The plugin has an options page in the backend.
My plugin only gets loaded if Woocommerce is active. Also, the plugin only gets shown on the product page IF the product is in the specified category.
Using shortcodes, the front end layout is generated in a function, where some enqueued scripts and css is present. The function also has some HTML.
As mentioned above, I am using woocommerce_before_main_content hook. This calls a function which has the do_shortcode('[ws_frame]') in it. This shortcode as the enqueued scripts, css and has some HTML. Yet, I do have ob_flush(); before the do_shortcode('[ws_frame]'). So this might be something?
Also, there isn't much more going on for the front end of this plugin. This is what have done to make it appear on the product page. The options page in the admin panel still works.
The question still remains, is it me, who needs to fix this, or is this something the theme creator is responsible for?
And how can I fix this myself? How can I make sure all of the hooks I'm using are still available in that theme? Even if it is the theme's creators fault, I would like to know how I can fix this myself.
I may be wrong but I guess in your case the theme for which your plugin is not displayed has the particular action removed. (you may check that in the respective theme's functions file.) Well, it is better idea to hook your plugin (functionality related into some action hook which is related to functionality or which renders some funcitonality (rather than being an UI related action).
Like, the action you have used to hook your plugin woocommerce_after_main_content along with another action, only outputs an html element wrapper. (which some themes might remove and use their custom html wrapper.
In your case since your plugin is related to / displayed on single product page, I would recommend to use relevant action to hook your plugin. e.g. woocommerce_after_single_product_summary or woocommerce_after_single_product, which are generally not removed by woocommerce compatible themes.
Hope this helps.
I just setup WooCommerce on my wordpress site:
http://artendijen.com/product/test-product/
I am not a fan of the template where it has the description and additional information below and in tabs, I would like the have the description and additional information to the right of the product image. Is there a setting I missed or will I have to edit it via CSS myself?
There is no setting for layout in WooCommerce. If you can do what you need to do with CSS then thats great. Otherwise, you will need to use hooks and actions in your functions.php to move things around. You can also overwrite woocommerce template files by copying them to your template with the same structure and file names you find in the WooCommerce plugin.
http://docs.woothemes.com/document/introduction-to-hooks-actions-and-filters/
I'm trying to theme Drupal 7's Ubercart 3 /cart page, but I'm struggling to find the theming function to do so.
I believe the right code may be located in template.tpl.php, but I am not sure.
Where in Drupal is the code to theme this page?
Create a new template file and name it page--cart.tpl.php
For more information about Drupal theming suggestions: http://drupal.org/node/1089656
(Don't forget to clear the cache after adding the new template file)
Another way to use Devel module with theme developer module to get all available theme suggestions.
Update:
If you are looking to style just the cart section, why don't use CSS. In Ubercart, the cart section has an div id div#cart-form-pane