wp_query_posts and masonry script
-
Hi, bit of a newbie to the coding side of things and have inherited a blog site which I’m trying to customise utilisiing the jquery masonry script. Got the custom template all set up here:
https://www.mommaloves.net/?page_id=1834I have 2 issues I want to resolve,
1. the masonry script, although loading all posts, you’ll notice that the display goes awry after the first few posts, I’ve check that the posts have been created correctly so could this be some sort of cache/memory issue?
2. The idea of the page being that the last sticky post is diplayed at the top across the width of the mainn container, I’ve got this working
<div id="sticky"> <?php $sticky = get_option( 'sticky_posts' ); rsort( $sticky ); $sticky = array_slice( $sticky, 0, 1 ); if (is_numeric($sticky[0])) { /* Query sticky posts */ query_posts( array( 'post__in' => $sticky, 'caller_get_posts' => 1 ) ); while ( have_posts() ) : the_post(); the_post_thumbnail( array(920,540), $attr ); the_title('<h3>', '</h3>'); if($post->post_excerpt) : the_excerpt(); else: the_content(); endif; endwhile; // End the loop. Whew. wp_reset_query(); } ?><div>
I’m needing to emulate how the links on the masonry bricks work ie, adding permalinks to the post? and ideally to exclude this post from being displayed by the masonry script.
Any help, greatly appreciated.
(Custom child theme of twenty twelve)
rgds
- The topic ‘wp_query_posts and masonry script’ is closed to new replies.