summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--angebote/inc/functions.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/angebote/inc/functions.php b/angebote/inc/functions.php
index 42dab03..8fda43a 100644
--- a/angebote/inc/functions.php
+++ b/angebote/inc/functions.php
@@ -62,7 +62,7 @@ function create_offer_post_type() {
),
'rewrite' => array(
#'slug' => 'aangebote/%custom-taxonomy-name%',
- 'slug' => 'angebote/%type%',
+ 'slug' => 'angebote/',
'with_front' => true,
)
)
@@ -109,12 +109,7 @@ function post_link_includes_taxonomy( $post_link, $id = 0 ){
$terms = wp_get_object_terms( $post->ID, 'type' );
file_put_contents("/tmp/wp.debug", json_encode($terms));
if( $terms ){
- # file_put_contents("/tmp/wp.debug", str_replace( 'angebote/' , 'angebote/' . $terms[0]->slug , $post_link ));
- # return $post_link;
- # return str_replace( '/angebote/' , '/angebote/' . $terms[0]->slug . '/', $post_link );
- return str_replace( '%type%' , $terms[0]->slug, $post_link );
- } else {
- return str_replace( '%type%' , '', $post_link );
+ return str_replace( 'angebote/' , 'angebote/' . $terms[0]->slug, $post_link );
}
}
return $post_link;