inc/featured-content.php¶
-
largo_get_featured_posts
()¶ Shorthand for querying posts from a custom taxonomy Used in homepage templates and sidebar widgets
Parameters: - $args (array) – query args
Returns: array $f featured post objects
Since: 0.3
-
largo_get_the_main_feature
()¶ Provides the “main” feature associated with a post. Expects to be called from within The Loop.
Uses: global $post Returns: term $bject|false Since: 0.3
-
largo_scrub_sticky_posts
()¶ If a post is marked as sticky, this unsticks any other posts on the blog so that we only have one sticky post at a time.
If this ever breaks, #blamenacin.
Parameters: - $after (array) – new list of sticky posts
- $before (array) – original list of sticky posts
Returns: array
Since: 1.0
-
largo_have_featured_posts
()¶ Determine if we have any ‘featured’ posts on archive pages
-
largo_have_homepage_featured_posts
()¶ Determine if we have any ‘featured’ posts on homepage
-
largo_get_featured_posts_in_category
()¶ Get posts marked as “Featured in category” for a given category name.
Parameters: - $category_name (string) – the category to retrieve featured posts for.
- $number (integer) – total number of posts to return, backfilling with regular posts as necessary.
Since: 0.5
-
largo_category_archive_posts
()¶ Helper for getting posts in a category archive, excluding featured posts.
Parameters: - $query (WP_Query) –
Uses: largo_get_featured_posts_in_category
Since: 0.4