Snippet: Custom Listing Post Type Slug
-
Hello,
I’m trying to use this snippets to change the ‘listing’ post type :
https://docs.wpcasa.com/article/snippet-custom-listing-post-type-slug/
<?php /** * Custom Listing Post Type Slug */ add_filter( 'wpsight_rewrite_listings_slug', 'custom_rewrite_listings_slug', 11 ); function custom_rewrite_listings_slug( $slug ) { return 'mycustomtype'; }
It works for both new listing i added and the links in the front end are also changed in what i want… But all links bring to 404..
Permalinks seems Ok in both old and new listing i’ve made..
I directly tried to edit the file “class-wpsight-post-types.php”, and changed directly the line 287 :
'rewrite' => array( 'slug' => apply_filters( 'wpsight_rewrite_listings_slug', 'mycustomtype' ), 'with_front' => false ),
But.. It leads to the same result : 404 !
Help appreciated, i really need to change the post type..
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Snippet: Custom Listing Post Type Slug’ is closed to new replies.