WordPress.org

Ready to get started?Download WordPress

Forums

AZIndex
azindex - custom post types (13 posts)

  1. lutherblissett
    Member
    Posted 3 years ago #

    I see that azindex only works with normal posts.

    Is there a way to make it work with custom post/taxonomy?

    Thanks

  2. EWSEL Team
    Member
    Posted 2 years ago #

    This will be very nice if some on can help i use also Custom Post/Taxonomy

    and can i great custom links
    now it look like

    http://mysite.com/a-z-index#char_47

    but i want it like

    http://mysite.com/a-z-index#g

  3. dariodev
    Member
    Posted 2 years ago #

    Plugin by default works with two deafult WordPress taxonomies 'category' and 'post_tag '. As you already know WordPress has three built in taxonomies 'category', 'post_tag' and 'link_category'. Further, plugin trace two WordPress post types 'post' (normal posts) and 'page'. When you know this and that, you can easily modify plugin to index your_custom_taxonomy and your custom_post_type.

    You need to modify two files: az-index-admin.php and az-index-cache.php. If you don't need to index your posts, the most easiest way to make it work with custom post/taxonomy is to change 'category' into ' your_custom_taxonomy' ($taxonomy), (there is several occurrences in both files) and to change 'post' into 'your_post_type' ($object_type), there is several occurrences in az-index-cache.php. And that's it.

  4. lutherblissett
    Member
    Posted 2 years ago #

    Thanks for the tip, Dario.
    I will try to follow your instructions.

  5. thedarkroomalive
    Member
    Posted 2 years ago #

    You need to modify two files: az-index-admin.php and az-index-cache.php. If you don't need to index your posts, the most easiest way to make it work with custom post/taxonomy is to change 'category' into ' your_custom_taxonomy' ($taxonomy), (there is several occurrences in both files) and to change 'post' into 'your_post_type' ($object_type), there is several occurrences in az-index-cache.php. And that's it.

    sorry in kinda new ._. what do i have to search and what do i have to change instead of what @.@

  6. sunriseweb
    Member
    Posted 2 years ago #

    Worked like a charm - thanks!

  7. virtualsweden
    Member
    Posted 2 years ago #

    sunriseweb: Can you please post wich lines to be edited. :-)

  8. mgrant
    Member
    Posted 2 years ago #

    If any of you actually got this to work, would you mind posting the diff changes you made?

    I do know from a little playing with the code that it shouldn't be too difficult. If I modify the word 'page' on line 632 of az-index-cacbe.php and put my custom type in there, it does, in fact, pull up an index of that type.

    It would be sweet if this module could be brought up to snuff for the 3.x world.

  9. lutherblissett
    Member
    Posted 2 years ago #

    This plugin looks kind of dead to me. Support doesn't exist either.

    I uninstalled it and hired a programmer to make a custom plugin.

    I think there is space for some willing programmer to build another a-z plugin, so that we can all forget this wreck and move on.

  10. sunriseweb
    Member
    Posted 2 years ago #

    http://sunriseweb.ca/wp-content/uploads/2012/02/azindex_customTaxonomy.zip
    You can download a copy of this plugin with the lines changed to support the "directory" custom taxonomy at this location.

    If you do a search and replace on directory in the plugin files then you should be good to go.

    Also note that I also added in a couple of functions because I had the need to automatically create/delete AZ indexes when new terms were added/removed to my custom taxonomy "directory".

  11. jankowalski
    Member
    Posted 2 years ago #

    this hack display only pages, doesnt show my custom pot type.why?

  12. sunriseweb
    Member
    Posted 2 years ago #

    You have to modify az-index-cache.php to manually add in the custom posts types you want to include.

    The custom post type I'm using is named "people" - so just search for "people" and add in your post type(s) in a similar manner.

    i.e. in functions

    • az_cache_post_changed
    • az_cache_check_custom
    • query_index_items
  13. jankowalski
    Member
    Posted 2 years ago #

    thanks you, this makes things clear. it works :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags