• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Genesis Custom Taxonomy template orderby

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Genesis Custom Taxonomy template orderby

This topic is: not resolved

Tagged: order, taxonomy, template

  • This topic has 3 replies, 2 voices, and was last updated 5 years, 9 months ago by gginer.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • September 22, 2016 at 1:14 pm #193551
    gginer
    Member

    Hello, I'm using the Focus Pro theme. I created a custom taxonomy and I duplicated the homepage.php and renamed it to taxonomy-mytax.php to also have the grid look on that taxonomy. Now I am trying to have two special things on that new taxonomy:

    1º. Show more posts than normal, so I have written 'posts_per_page' => 40, on the genesis_grid_loop (inside taxonomy-mytax.ph) but it doesn't seem to work.
    2º. To order the posts inside the taxonomy by alphabetical order. I have been trying some codes I found online to put on functions.php but also without success.

    That would be the two last things I need to make my website perfect, hope you can help me. Thank you in advance!

    Gabri

    September 24, 2016 at 12:58 am #193631
    gginer
    Member

    Someone knows or can tell me more or less where I should start looking? Thanks

    September 24, 2016 at 4:32 am #193639
    Victor Font
    Moderator

    How are you passing the filter arguments for to the grid loop? You need to pass two arrays. One for formatting the grid loop, the second to adjust wp_query. This is an example: https://code.garyjones.co.uk/genesis-grid-loop-advanced.

    The $grid_args array is the grid loop format. The $query_args array adjusts wp_query. This is where you pass the posts_per_page and orderby values.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    September 24, 2016 at 5:05 am #193641
    gginer
    Member

    Hi Victor and thank you for your help. I was trying to put the posts_per_page in the same array. I made a fast search and fount this article about how to customize the wp_query: http://www.billerickson.net/customize-the-wordpress-query/
    And everything is working as expected. Thank you!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2022 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble