Support » Plugin: Nooz » Anchor links to Groups/year/month

  • Is there a way I can create anchor links to the groups/years or even months?

    I’m working with a non-profit and they have about 500 press mentions from the past 4 years and I’d like to do something to enable sorting this content.

    Any help would be greatly appreciated. Excellent plugin! Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Contributor farinspace

    (@farinspace)

    Other than the yearly grouping, that I think you’re already aware of, there isn’t functionality like that implemented out-of-the-box. However, if you are so inclined you can create and attach your own taxonomies to the two post types nooz_release and/or nooz_coverage.

    The custom post types are created on action init so you would have to hook-in after that:

    add_action( 'init', 'my_custom_taxonomy', 11 );
    function my_custom_taxonomy() {
        // see: https://codex.wordpress.org/Function_Reference/register_taxonomy
        register_taxonomy( 'my_date_tag', 'nooz_coverage', $args );
        register_taxonomy_for_object_type( 'my_date_tag', 'nooz_coverage' );
    }
    

    Creating the initial taxonomies for existing month/years may be a manual process. But after that I would recommend hooking into action save_post and doing it automatically (on publish, if current month/year doesn’t exist, create it, then add post to it)

    Once you have taxonomies, you will have more sorting flexibility. You can even hook into the Nooz WP_Query args with filter nooz_shortcode_query_options.

    It does sound a bit complex, but it can be done. Providing easier sorting out-of-the-box is on our todo/roadmap.

Viewing 1 replies (of 1 total)
  • The topic ‘Anchor links to Groups/year/month’ is closed to new replies.