customize woocommerce templates and display store on home
Follow This and Make sure Your Shop or which page you want for default Home page and Then Save Button. Thanks
Follow This and Make sure Your Shop or which page you want for default Home page and Then Save Button. Thanks
In my experience with woocommerce, there are two ways. 1 – Add some extra css to your current theme. For example I want to modify the title of the product : I open the chrome inspector, I see that the product page has a class css for body.single-product. The product container has a class css … Read more
Because the url is not correct. The + sign is for concatenating strings in javascript language. You should use . sign. header(‘Location: ‘ . $url);
You’re checking isset( $_POST[‘SUBMIT’] ), but there’s no field with that name. If you mean to be checking the submit button, you need to give it a name attribute with the right value: <input type=”submit” name=”SUBMIT” value=”SUBMIT”> Now isset( $_POST[‘SUBMIT’] will be true, and your code will run. Also, you don’t seem to be using … Read more
If the data you placed at the beginning of your question is the result of your database query (I’m unsure by how your question is worded), you will want to take that query result and use the PHP function unserialize() to convert that data to an array, then you can access your data from that … Read more
get_the_ID is a WordPress core fuction in the global namespace, so you can’t make a second function called get_the_ID as it won’t know which one to use. You should just call get_the_ID() without writing a new function. For your example code, you could do something like this: <div> <?php echo do_shortcode( ‘[svg-flag flag=”‘ . get_post_meta( … Read more
Sounds to me like PHP is not running on your system, or (perhaps) an older version of PHP. But you can check PHP status by creating a simple PHP file with the command phpinfo(); in it and loading that page in your browser. That should show you the current settings of PHP, if it is … Read more
WC_Order_Query does not store a record of the SQL it generated, or the WP_Query that it used internally. So it’s not possible to get the information you need from WC_Order_Query directly. You could try using $wpdb->last_query immediately after using the class or function, but the last query more than likely isn’t the one you’re actually … Read more
If you’re just trying to add a template within the theme, name your file single-profile.php and that will apply to all single “profile” CPTs. But you mentioned you don’t want to touch the child theme. You could instead create a plugin and use a page_template filter to use your plugin’s single-profile.php template instead of any … Read more
The problem is you aren’t saving your custom query’s results. To do it your way, you would need to save the query’s results to a variable, like so: $myposts = query_posts( $archive_args ); if ( $myposts->have_posts() ) : while ($myposts->have_posts()) : $myposts->the_post(); However, that’s not the most efficient way. WP runs the default query in … Read more