• Resolved netivity

    (@netivity)


    Great job!!

    How do you use it with a custom post type?

    What if you have several custom post types?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter netivity

    (@netivity)

    Can you give an example of how to use this with a Custom Post Type like — Ingredients?

    I just want it to return the post in that Custom Post type.

    — thanks

    Thread Starter netivity

    (@netivity)

    Well after lots of trial and error here is the solutions….

    1. Create a shortcode by adding this code to your functions.php file

    function shortcode_atoz( $atts ){
        $ar = the_a_z_listing( array('post_type' => 'ingredient') ); 
    return $ar;
    }
    add_shortcode( 'atoz', 'shortcode_atoz' );

    2. Change the post_type to your custom post type.

    3. Insert the shortcode [atoz] where you want it to display.

    4. If you have another custom post type just change the name of your shortcode values and replace the post_type value.

    ??

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi, Sorry I didn’t get to this post before you found a solution.

    The plugin actually has a shortcode inbuilt, which as of 1.0.0 supports changing the post-type:

    [a-z-listing post-type="ingredient"]

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do you use it with Custom Post Type?’ is closed to new replies.