How can i display wath i am searching in a theme

Add the following code to your template’s search.php – somewhere before the loop: <?php global $wp_query; echo ‘Your results retrive (‘.$wp_query->found_posts.’ posts) with the subject ‘.get_search_query().’.’; ?> If search.php does not exists in your template’s directory, either copy archive.php (if it does not exists too, copy index.php – see template hierarchy) and rename it to … Read more

Two types of layout in woocommerce SHOP page [closed]

Set a button, or dropdown menu, that calls a function to set a cookie and to switch between CSS files which contain the _style ID: function switchStyle(style) { var file = $TMPL_URL + ‘/css/’ + style; jQuery(‘head’).append(‘<link rel=”stylesheet” href=”‘ + file + ‘” type=”text/css” />’); jQuery.cookie($TMPL_NAME + ‘_style’, style, { expires: 365, path: “https://wordpress.stackexchange.com/” }); … Read more

What type to upload image within theme options?

If using image radio buttons, define a directory path here is code. I hope its going work. $imagepath = get_template_directory_uri() . ‘/images/’; $options = array(); $options[] = array( “name” => __(‘Logo’, ‘prothemeus’), “desc” => __(‘Upload your logo’, ‘prothemeus’), “id” => “pt_logo”, “type” => “upload”);

How to get ‘Products’ on home page?

Here’s a product loop I found: <ul class=”products”> <?php $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 12 ); $loop = new WP_Query( $args ); if ( $loop->have_posts() ) { while ( $loop->have_posts() ) : $loop->the_post(); woocommerce_get_template_part( ‘content’, ‘product’ ); endwhile; } else { echo __( ‘No products found’ ); } wp_reset_postdata(); ?> </ul><!–/.products–> Maybe … Read more