WP_Rewrite::set_category_base( string $category_base )

Sets the category base for the category permalink.


Description Description

Will update the ‘category_base’ option, if there is a difference between the current category base and the parameter value. Calls WP_Rewrite::init() after the option is updated.


Top ↑

Parameters Parameters

$category_base

(string) (Required) Category permalink structure base.


Top ↑

Source Source

File: wp-includes/class-wp-rewrite.php

	public function set_category_base( $category_base ) {
		if ( get_option( 'category_base' ) !== $category_base ) {
			update_option( 'category_base', $category_base );
			$this->init();
		}
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.