Grid View version of posts
-
how can I make a secondary view method for my index page to display all posts as thumbnails in a grid? I can do the grid part and everything I just need the code to pull in all the posts for my “grid vew page”
-
Anyone?
do you mean a separate page with all the posts in grid view?
check the docu:
http://codex.wordpress.org/Pages
http://codex.wordpress.org/Pages#Page_Templates
http://codex.wordpress.org/Template_Tags/query_postswhat do you have so far?
is it just about showing all posts?
what does not work?
what needs extra input?Well, I wanted all of my posts to be automatically updated to the page with the “grid view”. So, I would have one blog but my posts showing up on 2 different pages.
ONE page: my standard blog with posts and text
SECOND page: a grid of thumbnails only, one from each post that links to the post.
Kind of like at Uncrate
I see that plugin for inline posts, but I’m not sure thats what I am looking for..
So far I have a page that will show any post as a grid, I just need to somehow call all of them from my index page in the “grid view”page’s loop..
Thakns!
yeah, ALL posts..
the basic steps are:
– for instance, make a copy of index.php, save it as ‘grid_template.php’;
– at the beginning of that file, add<?php /* Template Name: Grid Page Template */ ?>;
– then ‘add new’ page in admin, for instance call it ‘Grid of Thumbnails’; then, on the right hand side a little bit down, ‘attributes’ ‘template’ choose the one you just made ‘grid Page template’;
– edit your page template and put your code into it to show thumbnails in a grid style;
before the ‘loop’ add a line with query_posts://The Query query_posts('post_type=post&posts_per_page=-1'); // -1 is for all posts; //The Loop if ( have_posts() ) : while ( have_posts() ) : the_post();;
— hopefully this is all.for details and deeper understanding, please refer to the docu links of the earlier reply.
if you have problems, which i don’t expect, come back and describe what you have achieved so far, and maybe post a link and show the code of your template file (in a pastebin)
seems like my last reply was lost in the ‘ether’ 🙁
(all the following steps are described in the docu – read this for details)
here again:
steps to make a page template:
– copy index.php and save it as ‘grid_template.php’
– edit this file; add this at the beginning:<?php /* Template Name: Grid Page Template */ ?>;
– then edit this file to put your grid structure for the thumbnails in;
– before the loop, add a query_posts://The Query query_posts('post_type=post&posts_per_page=-1'); //The Loop if ( have_posts() ) : while ( have_posts() ) : the_post();– save the file.
– goto the dashboard; ‘add page’
– add a page with the name ‘Posts Thumbnail Grid’ (use your own name);
on the right a bit down, find ‘attributes’ ‘templates’ and choose ‘Grid Page Template’ from the list.— this should be all – all posts thumbnails should now be visible when you click onto the page ‘Posts Thumbnail Grid’.
when you get stuck, re-read the docu, or report back here with a description of where the difficulties are.
a link to your ‘site in progress’ could be helpful.you are awesome! Thanks so much, it worked like a charm!
How can I just use JQUERY to make the view switch? Any advice?
The topic ‘Grid View version of posts’ is closed to new replies.