Twenty Eleven Showcase: Link to page instead of post
-
This is a response to the original question of Twenty Eleven Showcase: Link to page instead of post (the question changes because the answers and now the topic is resolved).
Using the showcase template of Twenty Eleven theme, there is possible to do what that guy was asking: “Instead of having the showcase featured post slideshow link to a post, change the link to direct a person to specific page.”
I have a very dirty solution. In my child theme of Twenty Eleven, I have a modified copy of showcase.php.
Instead of
$featured_args = array( 'post__in' => $sticky, 'post_status' => 'publish', 'posts_per_page' => 10, 'no_found_rows' => true, ); // The Featured Posts query. //$featured = new WP_Query( $featured_args );I have
featured_pages_args = array( 'post_type' => 'page', 'post_status' => 'publish', 'post__in'=>array(<ids_of_pages_I_want_in_slideshow_sepparated_with_commas>), ); // The Featured Pages query $featured = new WP_Query( $featured_pages_args );Of course, this is a botch. I left a lot of useless code, and it must be rewritten. It would be better select the pages by category instead of by ID, for example. But the point is, that it can be done.
- The topic ‘Twenty Eleven Showcase: Link to page instead of post’ is closed to new replies.