This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Post_List vs. Post_Grid

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #14006
    canuck
    Participant

    Sorry, scratch the links above and please use these.

    On page http://s1057417.instanturl.net/haleyrehab.ca/techniques/, the page is displayed in a post_list format (good).

    However, if I click on the “Techniques” category on this page under one of the title, I am taken to http://s1057417.instanturl.net/haleyrehab.ca/category/techniques/, which is in post_grid format.

    I would like the second page to also show up in post_list format. How do I change this?

    Second, on page http://s1057417.instanturl.net/haleyrehab.ca/staff/, this is in post_grid format, which I want to keep, along with the category view, http://s1057417.instanturl.net/haleyrehab.ca/category/staff/.

    in other words, can I have one post category show up in post_grid for both the regular and category view, while having another category show up in post_list view?

    #14007
    canuck
    Participant

    If the above is not possible, what do you suggest as the best way to display the staff grid page and the pages themselves? I think they should be pages (vs. posts), which would help fix this issue, but there is no easy way to display the photos in a grid format or underlying format easily. Any suggestions are appreciated.

    #14018
    Jason Bobich
    Keymaster

    Hello,

    Sorry, I’m a little confused by all this. Let’s back up to the beginning. How are you putting your WordPress archives into post grids in the first place? — i.e. this would be a WordPress archive — Did you do it by following this tutorial?

    #14020
    canuck
    Participant

    Hi Jason,

    In an effort to get this link

    http://s1057417.instanturl.net/haleyrehab.ca/category/staff/

    to display in grid mode (due to the size of the pictures), I used the following code in my functions.php

    function my_template_parts( $parts ) {
        $parts['archive'] = 'grid';
        return $parts;
    }
    add_filter( 'themeblvd_template_parts', 'my_template_parts' );

    While this worked fine for the “staff” archive, it made all archives “grid”, whereas I only want “staff” to be in grid.

    I’ve since removed the code above, and now grid view is no longer on http://s1057417.instanturl.net/haleyrehab.ca/category/staff/ (I want the page at that link to look like this: http://s1057417.instanturl.net/haleyrehab.ca/staff/).

    It this possible to make the staff archive render in grid format but not any other archive?

    #14033
    Jason Bobich
    Keymaster

    You could try using a WordPress conditional like this:

    function my_template_parts( $parts ) {
    	if ( is_category( 'staff' ) ) {
        		$parts['archive'] = 'grid';
    	}
    	return $parts;
    }
    add_filter( 'themeblvd_template_parts', 'my_template_parts' );
    #14051
    canuck
    Participant

    Worked like a charm. Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.