How can we help?
If you are looking for support for our PokaTheme, this is the place!
Home › Forums › PokaTheme support › How to change the review link in pokatheme?
- This topic has 8 replies, 6 voices, and was last updated 1 year, 5 months ago by
Platon Jorbenadze.
-
AuthorPosts
-
April 14, 2018 at 7:38 pm #1803
Ermin Rajic
ParticipantHi guys and girls im just triyng the poke them for the first time on my site http://betting24.nu and i really like it but its also new for me so thereare some things im still struggelning on. For example right now i want my review links for ex http://www.betting24.nu/review/leovegas/ so be http://www.betting24.nu/recension/leovegas/ and i cant figer out how to change this=( There is a way to change the breadcrums and choose a site the “review” links to but i want to change the link=( Anybody know how to do this?
April 18, 2018 at 1:24 pm #1814admin
KeymasterHi Ermin,
In your child theme inside functions.php you’ll find a snippet called “Change CPT slug”
In specific:`add_filter( ‘register_post_type_args’, ‘change_slug_affiliates_cpt’, 10, 2 );
function change_slug_affiliates_cpt( $args, $post_type ) {if ( $post_type == ‘affiliates’) {
$args[‘rewrite’][‘slug’] = ‘affiliatesnewslug’;
}return $args;
}`You should activate your child theme in order to have the ability to make future changes and remove the comment from this snippet.
After that you can change the word “affiliatesnewslug” with your own slug.June 10, 2018 at 11:14 am #2022casino1
ParticipantThis reply has been marked as private.June 11, 2018 at 11:22 am #2032admin
KeymasterHi!
In the breadcrumb the name you see is the label->name of the CPT.
If you want to also change this Name you can change the above snippet with the following:`add_filter( ‘register_post_type_args’, ‘change_slug_affiliates_cpt’, 10, 2 );
function change_slug_affiliates_cpt( $args, $post_type ) {if ( $post_type == ‘affiliates’) {
$args[‘rewrite’][‘slug’] = ‘affiliatesnewslug’;
$args[‘labels’][‘name’] = ‘Recension’;
}return $args;
}`December 4, 2018 at 12:46 am #2781Alan Shoth
ParticipantThat working great thanks, but how can i edit my page with review? Simple i have a website xxxxx.com/review/leovegas-casino, and i want change content on my page xxxxx.com/review/ How can i do it?
December 11, 2018 at 11:48 am #2814admin
KeymasterHi!
First you have to disable archive page for the reviews by changing the code above to this:
`add_filter( ‘register_post_type_args’, ‘change_slug_affiliates_cpt’, 10, 2 );
function change_slug_affiliates_cpt( $args, $post_type ) {if ( $post_type == ‘affiliates’) {
$args[‘rewrite’][‘slug’] = ‘affiliatesnewslug’;
$args[‘labels’][‘name’] = ‘Recension’;
$args[‘has_archive’] = false;
}return $args;
}`Now we removed the archive page you can create a new custom page with the slug /review/.
May 2, 2019 at 9:33 am #4205Lior
ParticipantHi guys,
After changing the review slug, every new review I want to upload respond as expected.
The issue is that the reviews I made live before the CPT slug change didn’t change their slug to the new one. (I flushed cached)
Is there any way to make the change also retroactive?
Thanks!
May 2, 2019 at 1:56 pm #4207casino1
ParticipantHi,
Have you tried to updated permalinks? Sounds like they need a nudge.
Go to Settings -> Permalinks -> click save settings (no need to change anything) and the old reviews slug should be updated as well.
October 11, 2024 at 4:48 pm #18996Platon Jorbenadze
ParticipantHi,
I am interested in how to remove /review/ word from URL? -
AuthorPosts
- You must be logged in to reply to this topic.