Custom shortcode works in Elementor editor but not on frontend

The problem is with the require_once, you are passing a relative path and that path doesn’t exist. Assuming the test.php file you want to require is in this path wp-content/themes/your-theme/views/test.php You can use the following require_once locate_template(‘views/test.php’); Consider using include instead of require_one, if this shortcode is not 100% necessary for your site to function, … Read more

Storefront theme : Add Categoy to recent products section

I found it , the question is resolved : Solution : add_filter( ‘storefront_recent_products_args’,’my_custom_storefront_category_args’ ); function my_custom_storefront_category_args( $args ){ $args = array( ‘limit’ => 6, ‘columns’ => 3, ‘orderby’ => ‘date’, ‘order’ => ‘desc’, ‘category’ => ‘your-cat-slug’, ‘cat_operator’ => ‘AND’ ); return $args; }

How to override theme class function to child theme? [closed]

Based on the information provided? You can’t, it’s not possible. Child themes can only override code from parent themes if the parent theme explicitly provides a way for child themes to do so. They can do this by providing a hook, or by making functions ‘pluggable’, but class methods can’t be pluggable.