Forum Replies Created

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter LuxDelux

    (@luxdelux)

    Ok I figured out how to do it manually for those interested:

    Open

    rackspace-cloud-files-cdn/lib/functions.php

    On line 217 change

    $_SESSION['cdn_url']

    to

    'https://images.example.com'

    or whatever name you chose.

    My suggestion is to make this an option so we can easily change through the admin interface.

    Cheers

    Ah ok I figured it out, for some reason some of the values, like for example

    font-family

    was not being applied unless I added !important

    Even though there’s no other font-family in the css files. Weird

    Sorry, I didn’t explain my problem clear enough:

    – the inline css is in the head with noptimize-tags
    – the “Defer CSS loading?” option is checked

    the css files are deferred but the inline part is not loaded by the browser. I can see it in the code but the styles aren’t applied to the elements. It loads when “Defer CSS loading?” is not checked but that doesn’t bring much load improvement (per your website post I had the idea to deferr everything except critical parts)

    I tried switching the inline part around (before and after wp_head()) but nothing seems to make a difference.

    Any ideas? Or is this functionality not yet implemented?

    Cheers

    Just downloaded the dev version, trying to make deferred css work with

    <!--noptimize-->
    <style>body { background: #eaeaea; }
    </style>
    <!--/noptimize-->

    the above part is not loaded… Did I miss how this is supposed to work? As I figured it, the point would be to load the essential css inline like above and deferr the rest. So I included that and enabled the deferr css option.

    Is it supposed to be done differently? Thanks for all your work ??

    Thread Starter LuxDelux

    (@luxdelux)

    Awesome, I’m fairly new to php so didn’t know about explode (as I initially tried to first push the ID list into an array).

    Here’s the final output, works as expected, query monitor shows no errors ??

    <?php
    global $count_per_day;
    $valute = explode(',',$count_per_day-> getMostVisitedPostIDs(7,5,false,false));
    $pquery = new WP_Query( array( 'post_type' => 'post', 'post__in' => $valute ) );
    
    if ( $pquery->have_posts() ) {
            echo '<ul>';
    	while ( $pquery->have_posts() ) {
    		$pquery->the_post();
    		echo '<li>' . the_post_thumbnail('thumb-medium') . '</li>';
    	}
            echo '</ul>';
    } else {
    	// no posts found
    }
    
    ?>
Viewing 5 replies - 16 through 20 (of 20 total)