• Resolved chrimbus

    (@chrimbus)


    Hello. When using this plugin, in order to see “all” videos, I have to visit /vimeo-video/ … is there a way to change that just to “videos”?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author CodeFlavors

    (@codeflavors)

    Hi,

    Yes, it is. All you need to do is place the following piece of code in your theme/child theme functions.php

    /**
     * Change Vimeo Video Post category taxonomy slug from vimeo-videos to videos
     *
     * @param array $args - taxonomy arguments
     * @param string $taxonomy - taxonomy name
     * @param array $objects - post types that use this taxonomy 
     *  @return array
     */
    function customize_cvm_taxonomy( $args, $taxonomy, $objects ){
    	if( !function_exists( 'cvm_get_category' ) ){
    		return $args;
    	}
    	if( cvm_get_category() != $taxonomy ){
    		return $args;
    	}
    	$args['rewrite']['slug'] = 'videos';	
    	return $args;	
    }
    add_filter( 'register_taxonomy_args', 'customize_cvm_taxonomy', 10, 3 );

    Please note that after putting this code in your theme functions.php you must navigate to your WP admin Settings->Permalinks and save the permalink structure (you don’t need to change anything, just hit save). Please let me know how it goes, thank you.

    Thread Starter chrimbus

    (@chrimbus)

    Hello. I tried this but it did not work. No longer does the /vimeo-videos/ path result in anything either.

    Thread Starter chrimbus

    (@chrimbus)

    redacting last comment

    • This reply was modified 8 years ago by chrimbus.
    Plugin Author CodeFlavors

    (@codeflavors)

    After placing the code in your theme functions.php, have you updated the permalinks by going to WP Admin -> Settings -> Permalinks and hitting save (even without changing anything)?

    I can confirm that I tested the code above and it works as expected.

    Thread Starter chrimbus

    (@chrimbus)

    I ended up using a different plugin for the permalink change. Going to mark this as resolved. Thank you for your time on this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Is it possible to change the category URL name?’ is closed to new replies.