WordPress.org

Ready to get started?Download WordPress

Forums

Pet Manager
Use in more than one city (4 posts)

  1. dogwasher
    Member
    Posted 1 year ago #

    Hi ... very goo plugin. How I can add another category to show me the pets according to the city I choose?

    http://wordpress.org/extend/plugins/pet-manager/

  2. Diana
    Expert e diva
    Plugin Author

    Posted 1 year ago #

    Just add a taxonomy to deal with your pet posts:

    <?php
    add_action( 'init', 'create_state_tax' );
    
    function create_state_tax() {
    	register_taxonomy(
    		'state',
    		'pet',
    		array(
    			'label' => __( 'State' ),
    			'rewrite' => array( 'slug' => 'state' ),
    			'hierarchical' => true,
    		)
    	);
    }
    ?>

    More http://codex.wordpress.org/Function_Reference/register_taxonomy

  3. juanrahr
    Member
    Posted 10 months ago #

    Hi Diana, nice plugin!!! congratulations

    Please can you tell me please where must I insert this code?

    Thanks
    Regards
    Juan

  4. Diana
    Expert e diva
    Plugin Author

    Posted 9 months ago #

    You can insert in theme functions.php or create a plugin (it is just a file just some specific header see http://codex.wordpress.org/Writing_a_Plugin).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.