Support » Fixing WordPress » Need help with alphabetical listing

  • My site is at questicle.net, a review of every North American NES game and was recently migrated from blogger. I have created a custom post category that is pulled in on the List of NES games page. In blogger, these were alphabetical. WordPress is reverse sorting them based on the game #.

    I want to get these alphabetical, but I do not want to change the titles or URLs as it will impact SEO (I currently get 2200+ hits a day and have a great Google ranking – type in NES reviews as a test).

    Any suggestions would be so greatly appreciate! I am open to code, plugins etc., just need something that will work!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi rnmartiniz,

    After taking a look at one of your posts, which I assume this is one, I’m just gonna throw some ideas out there and see if they help. 🙂

    http://questicle.net/2014/03/754-zombie-nation.html

    If you don’t want to change the titles or change the slugs to your posts, you can also just change the publish dates to them so that it either ascends or descends to the order you want. This is also assuming you’re using a WordPress function like wp-list_categories to take advantage of the orderby parameter that you can set to order by date asc/desc.

    It’s a tedious task though. I did find a plugin however that lets you manually order your posts as well. You can give it a try or find another one that’s similar and works for you. However, be forewarned that the plugin, as this one says, may change dates anyway. Definitely back up your site before you install a plugin that might mess with your posts in a way you don’t want.

    Order your posts manually – plugin

    The last thing I could think of is perhaps writing the code where it orders not by date, not by name, and not by slug – so maybe a custom taxonomy?

    I’d say the two “easiest” and most code-free solutions are to manipulate your post dates manually or try a plugin.

    Hope that helps! Good luck.

    If you know your way around code, you could use the custom fields in WordPress.

    You could define a new custom field – for example game_name, then make a custom query that would retrieve all the posts having that key.

    $args = array(
    	'post_type'  => 'post',
           'orderby' => 'meta_value',
           'meta_key' => 'game_name',
           'order' => 'ASC' //for A-Z
    );
    $query = new WP_Query( $args );

    This snippet is just a starter example for a custom query and assumes your games are regular posts. It is untested and definitely needs refinement. Don’t paste it anywhere just yet, especially if you’re not familiar with WP coding.

    You would then need to modify the loop to use this query. This implies that you have made your site using a child-theme or a custom theme that you can edit without losing your changes on the next update.

    Providing answers to the following questions might enable us to give you more helpful answers. You seem to have quite a few games listed, so you definitely are in need of some automatic solution to this problem.

    Is the games page a category page or a custom template in a child theme?
    How are you getting the games in the page? Is there any code you can provide?
    Are you publishing new games as posts (from the Posts -> Add new menu) or is it a custom post type?

    With a custom query solution, while using custom fields, you would not have to change the URLs or post names, just add the name of the game as a custom field value.

    AncaIO can you please help me i sea your old topic.and follow your instruction about %day%-%monthnum%-%year%-%postname%/

    to

    %postname%/

    To solve my problem I used the plugin Safe Redirect Manager, with a regex redirect rule:

    /([0-9]{2})-([0-9]{2})-([0-9]{4})-([^/]+).

    i install the plugin and follow your suggestion but not work for me can you please help me i want to make:
    /%year%/%monthnum%/%postname%.html
    To
    /%postname%.html

    please sir help me i really thankful to you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need help with alphabetical listing’ is closed to new replies.