cemery
Forum Replies Created
-
Forum: Plugins
In reply to: [W3 Total Cache] [Plugin: W3 Total Cache] Editing css and syncing cdn filesAnother bit of information: I updated my CSS files directly through the Amazon AWS console yesterday. It didn’t change immediately, but does seem to have updated finally.
So, I’m guessing this means that the distribution does take a while to update – I’ve read 24 hours.
I’m still tweaking a recent re-design of my site, so this isn’t fast enough. My solution for CSS has been to list my main style sheet in the Reject Files field of the W3 Total Cache CDN management screen. Perhaps I’ll include it in the CDN once things are more stable. Maybe minifying would help…?
If there is no way to update image revisions faster – I’m guessing the answer is to make sure images are correct to begin with (goodbye sweet compulsion) or change the image name if something faster is required.
Forum: Plugins
In reply to: [W3 Total Cache] [Plugin: W3 Total Cache] Editing css and syncing cdn filesI came across this thread on ServerFault.com that suggest the issue is with Cloudfront not updating the files.
http://serverfault.com/questions/205111/css-files-not-getting-updated-on-cloudfrontIt claims you need to run an invalidation request through AWS to tell Cloudfront to update files sooner. Another possibility suggested in the thread is to delete and recreate the Cloudfront distribution. But that seems like an awfully heavy-handed solution.
It would be terrific if w3 Total Cache could somehow handle this automatically — if it is indeed the problem.
Forum: Plugins
In reply to: [W3 Total Cache] [Plugin: W3 Total Cache] Editing css and syncing cdn filesI’m having a similar problem with Amazon Cloudfront. When I modify CSS or try to replace an image attachment, the original file refuses to update on the distribution. I’m not sure whether this is an Amazon issue or a W3 Total Cache issue I’m having…
Forum: Fixing WordPress
In reply to: [How to] Site wide galeries and per-post galeriesI’m trying to figure out the same thing myself – namely how to build an images section for my site that will allow users to browse images by tag or category. Seems like it should be possible.
One method could be using attachment template tags. Another might be to create create a custom post type called image – then use template tags to display those. That’s as far as I’ve gotten. I’ll post again if I figure something out.
Forum: Plugins
In reply to: Advanced CategorizationAwesome! I think I found my answer, too. I modified the code I posted above with a get_posts loop and got this:
<?php $cid = get_query_var('cat'); global $post; $myposts = get_posts('cat=-22,-21,' . $cid . '&numberposts=5'); foreach($myposts as $post) : setup_postdata($post); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?>This grabs the category parameter from the URL and passes it as the variable $cid to the get_posts function. By concatenating that variable with other category ids to remove the things I don’t want to see in the loop (i.e., “-22,-21”) I can drill down to what I want to display.
Using the get_posts function also allows me to add other filters, such as post count and offset.
The only thing I’d like to change is to be able to filter the URL category id based on “and” logic – as in category_and – instead of subtracting out categories. Seems more elegant and manageable.
Does anybody know if you can pass category_and as an argument to get_posts with additional filters included such as numberposts, offset, etc? If so, do you have an example…?
Forum: Plugins
In reply to: Advanced CategorizationI just cam across this post which might offer some clues:
http://wordpress.org/support/topic/pass-variable-into-category_and-array?replies=4#post-897517
Seems he combined the URL-generated ‘cat’ parameter with another category ID in an array, then passed it as a variable into category_and. I’m guessing one needs to further modify the query_post arguments to change things like post count.
This still doesn’t address the warning not to use query_posts in multiple loops – but maybe I’m misinterpreting what “multiple loops means…?
Here’s his code:
<?php $cid = get_query_var('cat'); $myarray = array($cid,21); query_posts(array('category__and'=>$myarray)); ?> <?php while (have_posts()) : the_post(); ?> <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3> <p><?php the_excerpt('Read more »'); ?></p> <?php endwhile; ?>Forum: Plugins
In reply to: Advanced CategorizationI’m have a similar issue, Jill. I’m trying to have certain category pages such as http://www.mysite.com/category/something display several blocks of post teasers from that category based on co-categories.
So, for instance, it would look like:
Main category for page: Vermont
Loop 1: Activities (in Vermont)
Loop 2: National Parks (in Vermont)
Loop 3: Stores (in Vermont)I’d like to do things to each of these loops, such as limiting the post number and having a “featured” first post with a post thumbnail displayed.
The confusing part, for me, is preserving the parameters created by the category URL while modifying the multiple loops on the page to create the filtered blocks.
Using query_post to filter each loop seemed like a good idea, but the Function reference entry says it shouldn’t be used for multiple loops. Also, it overrides the parameters from the category URL, unless you use:
global $query_string;and then recall it as such:
query_posts($query_string . "&order=ASC");Perhaps it’s a matter of putting conditional category logic inside the standard loop, as they show on The Loop page in the documentation
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if ( in_category('3') ) { ?> <?php } else { ?> <?php } ?>But this doesn’t solve my questions about limiting the number of posts shown or perhaps excluding certain post types from showing up in the loop.
If I figured it out I’ll let you know.