• Resolved J

    (@paradox_designs)


    Hi,

    In a wordpress website I have the category and tag base to be set up as follows to have the word blog before posts:

    Category base blog/category
    Tag base blog/tag

    I want this only for regular posts, however this seems to have applied to the WP Store locator custom post resulting in urls like: /blog/location/studio-city/

    Any way to ignore or circumvent this issue to just have /location/studio-city/ without the blog base?

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    Try this code ( untested ).

    Add it to the functions.php inside your active theme folder.

    add_filter( 'wpsl_post_type_args', 'custom_post_type_args' );
    
    function custom_post_type_args( $args ) {
    
        global $wpsl_settings;
    
        $args['rewrite'] = array( 'slug' => $wpsl_settings['permalink_slug'], 'with_front' => false );
    
        return $args;
    }

    After adding the code, go the the settings -> permalink page and re-save it. Also flush the WPSL transient cache on the WPSL settings page ( tool section ).

    Thread Starter J

    (@paradox_designs)

    Fantastic, that works!

    Thank you…

    Thread Starter J

    (@paradox_designs)

    It now seems that it fixed the url of the individual store pages but produces a 404 on that page

    Plugin Author Tijmen Smit

    (@tijmensmit)

    Try to flush the permalink settings. You can do this by simple re-saving the used settings in the admin area -> Settings -> Permalinks.

    Thread Starter J

    (@paradox_designs)

    That worked. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Ignore/override WP’s basic post permalink base’ is closed to new replies.