Unfortunately due to other commitments, we are no longer able to provide support for these themes.

All our themes are now free and can be downloaded by anyone to use/modify however they wish.

We want to thank all our users for their support over the years. All the best in 2020 and beyond.

Add pages and custom post types to Grid capabilities

kanekane Lifetime Member
edited December 2015 in Richmond
The current options for the front page grid module allow you to pull from a portfolio post type, or recent posts. It would be great to be able to pull from pages instead by specifying the page number.

Custom post types would be great as well, but less important than pages IMO.

Is there an easy way to rebuild the grid module to allow this?

Thanks!

//edited to put this into Richmond category//
Post edited by kane on

Comments

  • Options
    Mark_HodderMark_Hodder Administrator, Lifetime Member
    We can look at adding pages in a future update but for now if you edit box.php included with the skin, look for:
                $terms = explode(',', $categories);
                if ($function == 'portfolio' and $categories) {
                    query_posts( array ('posts_per_page' => 2, 'post_type' => $function, 'tax_query' => array( array( 'taxonomy' => 'portfolio-category', 'field' => 'id', 'terms' => $terms, 'operator' => 'IN' ) ) ) );
                }
                elseif ($function == 'post' and $categories) {
                    query_posts( array ('posts_per_page' => 2, 'post_type' => $function, 'cat' => $categories ) );
                }
                else {
                    query_posts( array ('posts_per_page' => 2, 'post_type' => $function ) );
                }
                $i = 1;
    and change it to something like:
                $terms = explode(',', $categories);
                $function = "page";
                if ($function == 'portfolio' and $categories) {
                    query_posts( array ('posts_per_page' => 2, 'post_type' => $function, 'tax_query' => array( array( 'taxonomy' => 'portfolio-category', 'field' => 'id', 'terms' => $terms, 'operator' => 'IN' ) ) ) );
                }
                elseif ($function == 'post' and $categories) {
                    query_posts( array ('posts_per_page' => 2, 'post_type' => $function, 'cat' => $categories ) );
                }
                elseif ($function == 'page') {
                    query_posts( array ('posts_per_page' => 2, 'post_type' => $function, 'post__in' => array( 29, 24) ) );
                }
                else {
                    query_posts( array ('posts_per_page' => 2, 'post_type' => $function ) );
                }
                $i = 1;
    Changing the 'post__in' => array( 29, 24) to the page ids of the two pages you want to use.
    Need Additional Help?
    - Check out the Resource Center for helpful tutorials and hints.


    image
This discussion has been closed.