• Hello,

    I’m trying to change the name of the /placemark/ to /address/ using the exaple suggested here:
    https://pastebin.com/ActzpkwX
    I’ve added this code to my functions.php (did i need to add all the code?):

    public function modifyPostTypeParams( $params )
    {
    $params[ ‘rewrite’ ] = array( ‘slug’ => ‘address/%category%’, ‘with_front’ => false );

    return $params;
    }
    add_filter( ‘bgmp_post-type-params’, array( $this, ‘modifyPostTypeParams’ ) );

    Now my placemark links don’t work anymore (not with /placemarks/ or /address/). When I removed the above code from functions.php, the placemark links now start with ‘/bgmp/’.

    Totally confused here, help needed.

    https://www.ads-software.com/plugins/basic-google-maps-placemarks/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ian Dunn

    (@iandunn)

    That should do it, but after you add that code you’ll also need to visit Settings > Permalinks in wp-admin to flush the rewrite rules.

    Thread Starter the_cats_paw

    (@the_cats_paw)

    OK, I managed to bring /placemarks/ back, but when I put the code I provided into functions.php – it doesn’t replace /placemarks/. It actually makes placemarks disappear from the menu and none of the placemark links work.

    What I do is:
    1. I paste this code into my functions.php
    2. Go to my settings->permalinks and click save (is that what you meant by flushing it?)
    Is this the correct order?
    Can you please also check if the syntax in my code is OK.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘/placemarks/ name change’ is closed to new replies.