Created
March 22, 2017 18:01
-
-
Save web-hat/58896caf71ec7a775a9fef2c3a2b12dc to your computer and use it in GitHub Desktop.
Add ‘/blog/’ Prefix in Blog Posts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$labels = [ | |
"name" => __('Services', 'text-domain'), | |
//... | |
//... | |
]; | |
$args = [ | |
"label" => __('Services', 'text-domain'), | |
"labels" => $labels, | |
//... | |
//... | |
"rewrite" => ["slug" => "service", "with_front" => FALSE], //<-- SET with_front to FALSE | |
//... | |
]; | |
register_post_type("service", $args); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment