Forum Replies Created

Viewing 9 replies - 16 through 24 (of 24 total)
  • Thread Starter junior

    (@epiric)

    I feel like an idiot now. I just found out how to do it. Topic closed, and if someone needs it here is the code, you can put it on page.php or index.php, or where you need it.

    <ul class="products">
        <?php
            $args = array( 'post_type' => 'product', 'posts_per_page' => 1, 'product_cat' => 'shoes', 'orderby' => 'rand' );
            $loop = new WP_Query( $args );
            while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>
    
                <h2>Shoes</h2>
    
                    <li class="product">    
    
                        <a href="<?php echo get_permalink( $loop->post->ID ) ?>" title="<?php echo esc_attr($loop->post->post_title ? $loop->post->post_title : $loop->post->ID); ?>">
    
                            <?php woocommerce_show_product_sale_flash( $post, $product ); ?>
    
                            <?php if (has_post_thumbnail( $loop->post->ID )) echo get_the_post_thumbnail($loop->post->ID, 'shop_catalog'); else echo '<img src="'.woocommerce_placeholder_img_src().'" alt="Placeholder" width="300px" height="300px" />'; ?>
    
                            <h3><?php the_title(); ?></h3>
    
                            <span class="price"><?php echo $product->get_price_html(); ?></span>                    
    
                        </a>
    
                        <?php woocommerce_template_loop_add_to_cart( $loop->post, $product ); ?>
    
                    </li>
    
        <?php endwhile; ?>
        <?php wp_reset_query(); ?>
    </ul><!--/.products-->
    Thread Starter junior

    (@epiric)

    Hello, sorry for not being able to answer sooner. First of all thank you for your reply. But is it normal that wordpress gallery doesnt pass w3c html5 validation by default, or did i mess something up?

    Im not that good at php, so i dont think i can manage to “return” all the data for my own gallery..
    You gave me an idea, so i will try to find online some custom gallery function that replaces default one, and maybe passes validation.

    Thread Starter junior

    (@epiric)

    i noticed when i changed permalinks to default, from %pagename% its working. Is there any soulution to get this working with %pagename% or whatever its called.

    Thread Starter junior

    (@epiric)

    can someone plz help :S … so the problem is now only in IE 8 and lower. But my main concern is only IE8 . Does anyone have an idea why isnt it working? I wanted to try with older version of addon maybe… but couldnt find 0.5 for download

    Thread Starter junior

    (@epiric)

    cheers m8… working gre8! ??

    Thread Starter junior

    (@epiric)

    Hey m8… really thanx… i installed widget to upgrade jquery and its working now. Only one last question, and we can close topic… I tryed to change options in widget area (woeid etc..) and its not working that way… i save changes but they dont reflect on widget. So i tryed to see in php files… changed location, thats ok now.. but i need only to leave image and temperature, if i change from true to false for (shortcode.php)items…it blocks entire addon… how can i remove everyting except temp and image then? :S thnx alot

    Thread Starter junior

    (@epiric)

    hello there.. sorry for late reply.. i just moved site to live server.. its not finished yet tho..https://scatola.hr/opcina/ its in header.php.. this what is displayed is just image from design for now.. there should be alfie weather. ty

    Thread Starter junior

    (@epiric)

    im new to wordpress, tryed searching plugins for my problem.. but didnt see this… ill try using it..maybe ill manage to get it to work. i think i didnt mention, this code what i have up there works, but ofc it displays same posts on two locations on index page. ty

    Thread Starter junior

    (@epiric)

    thanx. i tried putting that in my header where i need that widget but its not showing anything.. when i put it in sidebar.php the it just says local weather and thats it.. ill try to figure out whats wrong somehow.

Viewing 9 replies - 16 through 24 (of 24 total)