How to add a slider filter for woocommerce WoodMart Theme - woocommerce

In an wordpress site, we have woodmart theme installed. In the sidebar I want to add a widget, which does something like this :
function myfunction($args) {
add_slider($product_attribute, 'attribute_string');
}
So for example, if there were EV -s being sold, then the slider could filter between two range values, and only EV-s that has a range within the slider interval will be shown.
I am not sure how to get started. I have found out, that this file has a function that creates the widgets wp-content/themes/woodmart/inc/widgets/class-widget-layered-nav.php. But I can't find where individual widgets are created.
My concrete question is, which file do i need to modify, to add a slider that can filter products by an attribute, and how do I find the appropriate attributes to be used in the function myfunction above.
I can't find any info in the woocommerce help forum, as support is limited, and they just say that edit the file ./wp-content/themes/woodmart/inc/integrations/elementor/elements/class-sidebar.php at my own risk - but that is not very helpful.
I see some woocommerce questions here, so I am looking for help. Thank you. I will accept with a php oran Ajax or jquery solution.

Related

ExVat IncVat on single Product Page of Woocommerce

I am trying to integrate the exVat incVat auto Suffix from the Cart Page to the single product page..
Currently if you go to checkout the prices will show exVat incVAT depending on how taxes are set up within woocoomerce when change the country they change automatically to display correctly. However on the single product page it either shows nothing or you can force it to say one in the settings. Would be much nicer if it could display either suffix.
Screenshots of example from shop page:
incVat
exVat
Is there a solution to make the single product page do this?
(I have spent 5+hrs trying options from custom code and editing the templates but with little success so would appreciate some help :D)
I have tried a mash of other codes and my own experience into fucntions.php with fatal errors or not really touching what I am looking for.
I have also tried unsuccessfully editing WooCommerce template files.
Any help much appreciated.

Within an admin menu point, set number of posts via input field

I'm quite new to Wordpress and currently working on a custom plugin.
I know how to create a new admin menu point via plugin, now I'm trying to figure out how to add a functionality, when entering the site the user shall be able to specify the number of shown posts via input field - the amount of posts shall be saved in a way that you receive a shortcode for the amount.
Hope that was clear. Thanks in advance!
I know there are a lot of Wordpress php codesnippets and shortcuts to use, but I'm uncertain which the ones are I need.

WordPress Left Navigation

This may be an odd question. I'm working on a website someone else built in WordPress. My understanding of the left navigation within the dashboard is that there are some default items that are there upon install like [pages], [posts], [plugins], and to get additional items to show up here you need to install a new plugin.
This site I'm working on has a few options in the left navigation [team members], [services] which do not appear to be tied to any particular 3rd party plugin.
In fact, it looks like they've used the plugin "Advanced Custom Fields" to create their own functionality so their users could easily add/remove team members from a custom built slider.
My Question
How do you get your own tab to show up in the dashboard's left navigation? Can you do this within a child theme, or do you need to modify the core WP files? Is there a particular folder or some documentation anyone could direct me to where I might learn more about how this is being connected behind the scenes?
Thank you kindly in advance.
I'll preface this by saying:
Never ever ever modify Core Files!
Whew! Now that that's out of the way, there may be a few plugins that do this for you, but I'm ultimately unfamiliar with any. The typical way to add Admin Items is with the add_menu_page() and add_submenu_page() functions. They're relatively straight forward to use.
Also, as a side note, when you add a Custom Post Type with register_post_type() (like what ACF does) there are options to add it to the menu, as well as what you want the labels and menu names to be.
If you're adding a Custom Post Type (like Team Members, Books, etc.) you'll almost certainly want to make use of the labels and show_in_menu arguments when you call register_post_type() to get the admin menu to show up. However, if you need to link to arbitrary URLs or custom dashboard pages, you'll want to make use of the add_menu/submenu_page functions above.
For instance, here's a simple snippet that will add a Stack Overflow link to the menu, you can drop this into a child theme, plugin, Must-Use plugin, etc:
function stack_overflow_admin_link(){
echo '<script>window.location.href = 'https://stackoverflow.com'; </script>';
}
add_menu_page( 'Stack Overflow', 'Stack Overflow', 'subscriber', 'stack-overflow', 'stack_overflow_admin_link', 'dashicons-external' );
Hope this helps!
Also I'll elaborate a little bit on my warning! Never ever modify core WordPress files. They will be overwritten with each and every WordPress update. WordPress is relatively well thought out and has countless Action Hooks and Filters that let you inject, modify, remove, and otherwise manipulate data and the user experience without ever touching core files.
As an example, take a look at this screenshot:
I'm currently rebuilding a software suite from the ground-up using WordPress, but the standard WP Admin interface doesn't make sense in many of the contexts we need it, so our interface (a work in progress) looks like this, and it's all handled by a Must-Use plugin and touches absolutely no core files, it just uses clever manipulation of the hooks and filters available throughout WordPress

WooCommerce - Variations

I am using WooCommerce in my project and would like to display variations in a similar style like http://www.e-rudy.com/en/products/detail/SN220724R1. They have a tab called "other colors". Is it possible to do that in WooCommerce?
Yes, it is possible, but you will have to add a custom template for that to be incorporated in the product tabs. In that template you should pull all the variations information corresponding to the main product.
If you don't do it as parent->variations products, you can still link them in the backend and show those in the template. In short, it's doable but you or someone else will have to code that part. It might also be possible to do it with wp-types views, but I have never used it so I can't comment.
Hope that helps to get you started.
Like this https://woocamp.com/product/classic-wordpress-shirt/ ?
When you click on the additional sizes, nothing visually happens. But the size is registered as a variation. Now, when you select a different color, the image actually changes and the image switches as well!
I did that using WooCommerce Variations and Swatches

Cubepoints: author Link and Ranks

have been playing with Cubepoints (wordpress plugin) and have installed the ranks module but can't work out how I would add the persons ranks to the top user widget. I have ranks displaying in the authors profile but can't figure out what the shortcode would be and what I'd have to put in hooks file, anyone know?
On a related note I want to link to the authors profile page from the top user widget, but can't seem to find anything in the shortcode about this. Must be possible as I have seen blogs using this plugin doing so.
In the text field of the widget write:
%username%%points%
This is for Buddypress. If you are using WordPress without this plugin, write this
%username%

Resources