Forum Replies Created

Viewing 15 replies - 61 through 75 (of 123 total)
  • Thread Starter DesignLoud

    (@designloud)

    so I am able to do this with the pseudo class like this:

    .post_content p a:before {
        content: url("https://my-domain.com/wp-content/themes/my-theme/images/top-right.png") ;
        position: absolute;
        right: 25px;
        top: 26px;
    }

    But how can I add a class to the anchor tag surrounding each image uploaded and inserted into post by the admin?

    Thread Starter DesignLoud

    (@designloud)

    Hey damian, I did get it working flawlessly and have recently put a tut up on my site, super easy to customize.. I will have to try to put it in a plugin soon or just build it in to the woocommerce radio buttons plugin that we will be updating soon..

    Here is the link: https://designloud.com/how-to-add-products-per-page-dropdown-to-woocommerce/

    Good luck!

    Thread Starter DesignLoud

    (@designloud)

    Any reason why this may not be working on a mac? Cookies are enabled but they still say it doesnt work??

    Thread Starter DesignLoud

    (@designloud)

    Thanks Andrew but the link is in the first post and as I mentioned in the last post, I got it worked out with just using images like Doodlebee suggested, so I’m not sure what your asking for here..

    Thanks for looking though ??

    Thread Starter DesignLoud

    (@designloud)

    Thanx guys, I ended up just using images which does the trick in the mean time until I can figure out a simple solution via CSS.

    Thread Starter DesignLoud

    (@designloud)

    Hmm, both good options.. I was hoping to avoid having to many images on the page but it looks like currently that is my only option is to just tile the bg and artificially put a shadow on some of the inner elements like on the left of the footer and reservation area background.

    Dominor, your approach did seem like the better option but I could not get it to work, even after several revisions. Below is what I ended up using on my last attempt.

    I would love to be able to tackle this via CSS but it looks like until I find a better solution that the tiled background would be the way to go..

    JQuery Attempt:

    // Equal height for #primary and #container.
    // jQuery code from: https://web.enavu.com/tutorials/equal-column-height-with-jquery/
    // Modified for Thematic by https://www.dominornovus.com
    
    function equal_height_primary_and_container() {
    
    ?>
    <script type="text/javascript">
    jQuery$(window).load(function(){
    //#container and primary need to have the same class. Add class to each:
    jQuery("#content-area.wrap div#sidebar.fltleft ul.xoxo, #content-area.wrap div#content.fltright").addClass("equal_height");
    //set the starting bigestHeight variable
    var biggestHeight = 0;
    //check each of them
    jQuery('.equal_height').each(function(){
    //if the height of the current element is
    //bigger then the current biggestHeight value
    if(jQuery(this).height() > biggestHeight){
    //update the biggestHeight with the
    //height of the current elements
    biggestHeight = jQuery(this).height();
    }
    });
    //when checking for biggestHeight is done set that
    //height to all the elements
    jQuery('.equal_height').height(biggestHeight);
    });
    </script>
    <?php
    
    } 
    
    add_action('wp_head', 'equal_height_primary_and_container');

    Thread Starter DesignLoud

    (@designloud)

    You sir, are a god and a very well respected individual! I see now what you meant with the cookie and the if/elseif/else statement. Thank you very much for your help through this whole thing.

    Thread Starter DesignLoud

    (@designloud)

    Lol, I am sorry guys I still cannot get this even with trying to incorporate bcworkz’s logic. Chances are I am doing it wrong or over-thinking it. Is it possible to get an example or is this method easier: https://github.com/carhartl/jquery-cookie. Problem with that though is that I dont know how to setup the custom jquery on my end. I tried tampering with both approaches for awhile and no success.

    Forum: Hacks
    In reply to: Radio Buttons in Widget
    Thread Starter DesignLoud

    (@designloud)

    AHH, Thank you so much! That was where I was lost was setting the value and retrieving it. Everything works perfect now

    Thread Starter DesignLoud

    (@designloud)

    Thanks so much dude, I will give it a shot and let you know..

    You rock!

    Thread Starter DesignLoud

    (@designloud)

    Wow thanks for that head start and thanks so much for your help! Cheers

    Thread Starter DesignLoud

    (@designloud)

    Wow, after tons of exploring on the internet, a full nights sleep and a cup of coffee (make that two cups) I finally got it!! Thanks so much for your help!

    Now I only face two small problems:
    1) how do I get the number of results per page that the user sets display through all pages? Currently I can select 4 products per page and the page I am on adjusts but when I click on next page it goes back to default.

    2) This isnt as big of a deal but is there anyway to make the option the user chooses the ‘selected’ one when the page refreshes? In other words when I click on 24 results per page and hit submit, when the page reloads with the adjustments the dropbox still has the first option as the selected tag.

    here is what is currently working:

    function woocommerce_catalog_page_ordering() {
    ?>
    <form action="" method="POST" name="results">
    <select name="woocommerce-sort-by-columns" id="woocommerce-sort-by-columns" class="sortby">
    <?php
    			$shopCatalog_orderby = apply_filters('woocommerce_sortby_page', array(
    			    ''       => __('Results per page', 'woocommerce'),
    				'4' 	=> __('4 per page', 'woocommerce'),
    				'12' 		=> __('12 per page', 'woocommerce'),
    				'24' 		=> __('24 per page', 'woocommerce'),
    			));
    
    			foreach ( $shopCatalog_orderby as $sort_id => $sort_name )
    				echo '<option value="' . $sort_id . '" ' . selected( $_SESSION['sortby'], $sort_id, false ) . '>' . $sort_name . '</option>';
    		?>
    </select>
    <input name="submitbutton" type="submit" value="submit" />
    </form>
    <?php
    
    } 
    
    function dl_sort_by_page() {
    global $dl_page_value;
      $dl_page_value = $_POST['woocommerce-sort-by-columns'];
    
      return $dl_page_value;
    }
    
    add_filter('loop_shop_per_page','dl_sort_by_page');
    add_action( 'woocommerce_pagination', 'woocommerce_catalog_page_ordering', 20 );

    Now im going to make that second cup o’joe ??

    Thread Starter DesignLoud

    (@designloud)

    Thanks, Tried it out and still no luck…. yet.. Here is what I found in the Woo files, let me know if I need to look for something else or this isn’t it.

    // Query vars that affect posts shown
    		if ( ! $q->is_tax( 'product_cat' ) && ! $q->is_tax( 'product_tag' ) )
    			$q->set( 'post_type', 'product' );
    		$q->set( 'meta_query', $meta_query );
    	    $q->set( 'post__in', $post__in );
    	    $q->set( 'posts_per_page', $q->get( 'posts_per_page' ) ? $q->get( 'posts_per_page' ) : apply_filters( 'loop_shop_per_page', get_option( 'posts_per_page' ) ) );

    Here are a couple of files I think might be relative as well since they call the ‘loop_shop_per_page’:
    content-product.php

    content-product_cat.php

    Thread Starter DesignLoud

    (@designloud)

    Ya I have tried adding ‘results’ where I thought it went but I still cant get it right. It works all the way up to the point where it is actually supposed to display the results for the page.

    Excuse the noobness here but I appreciate you taking the time to help me learn it and get it going.

    Thread Starter DesignLoud

    (@designloud)

    excuse me if this is a laughable question but where do I put the array key ‘results’?

    Just to make sure I am paying attention here is where I am with it

    function woocommerce_sortby_page () {
      $value = $_POST['woocommerce-sort-by-columns'];
      add_filter('loop_shop_per_page', create_function('$cols', 'return $value;'));
    }
    
    function woocommerce_catalog_page_ordering() {
    ?>
    <form action="" method="post" name="results">
    <select name="woocommerce-sort-by-columns" onchange="document.forms['results'].submit();">
    <option value="12">12</option>
    <option value="16">16</option>
    <option value="20" selected>20</option>
    <option value="24">24</option>
    <option value="28">28</option>
    </select>
    </form>
    <?php
    } 
    
    add_action( 'woocommerce_pagination', 'woocommerce_catalog_page_ordering', 20 );

Viewing 15 replies - 61 through 75 (of 123 total)