For use with entries from any Taxonomy type & term, this page template sorts posts or pages by the price you add as the value for the custom field like this :
The template enables you to :
- Display posts on the same archive page, with pagination, by any taxonomy type including categories, tags, custom post types and custom taxonomies and terms.
- Sort the posts by price so they order highest to lowest price or lowest to highest.
- Convert custom field values for prices from numbers like 1000000 to $1,000,000 adding the currency symbol and commas.
- Modify & reposition all the hooks used in Genesis archive pages.
- Include or exclude the featured image regardless of the global Genesis > Theme Settings > Content Archive settings.
- Set the featured image size and alignment independent of global settings.
- Customize the read more link.
- Modify the entry meta.
- Overlay the price on the featured image using the CSS provided.
Shows posts from different categories ordered by price, highest to lowest on a custom archive page template with pagination.
Tested using the Genesis Sample child theme by StudioPress however should work fine in any Genesis child theme without the need for any modification.
There’s 3 steps :
- # Upload the file named posts-by-categories.php to your child theme folder like this :
- # Copy & paste the CSS from the style.css file to the end of your child themes style sheet and clear caching.
- # Install the Advanced Custom Fields ( ACF ) plugin, free or premium version and create a new number field named price or import the file named acf-72842.json from your WordPress Dashboard > Custom Fields > Tools > Import Field Groups > Import File
You can then add a price to each listing using the custom field named price.