Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter argdev

    (@argdev)

    Hey there,

    Sorry that I didn’t reply. I thought I did.

    Basically I need to emulate the to bar button Clear cached assets/js.

    I administer some sites and whenever I update some css or js files I have to flush W3TC and your plugin’s cache. For the former I can do it with a webhook and a function but for yours I wasn’t able yet.

    Basically I need a guy to do what the button on the admin but inside my function.

    Thanks!

    Me again, i’ve found the solution!

    Open the page were the image size is being changed, find the loop, e.g:

    if ( have_posts() ) : while ( have_posts() ) : the_post();

    // Loop code, thumbnail woocommerce function, etc

    endwhile; endif;

    and remplace it for:

    query_posts($args); // Note: if there’s no arguments for the query, it can be empty

    //loop code, call the default thumnail function! the_post_thumnail()

    rewind_posts();

    I hope that could do the trick!

    Thread Starter argdev

    (@argdev)

    I’m referring to my theme custom templates, i think i’ve found the solution about a seconds ago.

    Writing this post, i started thinking: what’s the difference between index.php and the other pages, well i realized that the main difference was the loop i was using.

    In the pages were the images were showing at a huge size the loop was the default one:

    If has posts, while the post, the post, etc.

    That only worked with the woocommerce’s image code, what makes the images show at a huge size.

    I changed the default loop for:

    <?php query_posts(); ?>

    //stuff here, thumbnail (now at the right size)

    <?php rewind_posts(); ?>

    And that worked! Now i’ve control over the images and their size.

    Sometime ago i’ve read that using query_posts was not recommended, is that true? Thanks!

    Hi! i’ve a similar problem, the products featured images are HUGE, i mean 1500x900px (or the original size of the uploaded image), i discovered that wordpress is not creating thumbnails, in uploads folders are only the original images! not the cropped ones.

    Something extrange is happening, there’s a exception, the main page.!

    The featured images appear at the right size, and the fuction the_post_thumbnail is working, The main page,

    index.php calls different querys for some customs terms (artist name e.g), and the it get a template get_template_part

    Within that template is the code of the thumbnail, the_post_thumbnail, etc, but in the others pages i’ve to use the woocommerce hooks to show the images.

    I hope someone could help me! Thanks

    Hi! Don’t know if you have already get that to work but if you don′t, here’s what happened to me and what makes the “Your cart is currently empty.” message appear.

    The problem is generated by the product cart template page, so make sure that:

    – You don′t have a file called “page.php” within your child theme folder (that will cause that all the pages, including the cart page take that as template)

    – The page is created and has the shortcode, go to: pages > cart, open it, it must contain the shortcode:

    [woocommerce_cart]

    Only that is needed! You don′t have to put anything more inside the page.

    Hope you can fix your problem, if it has not yet fixed, and sorry about my english, it’s my native one!

Viewing 5 replies - 1 through 5 (of 5 total)