Home Forums Themes Support General How to change post type slug in HaruTheme

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2687

    Hi all Customer,

    In this topic tutorial we’ll help you change posttype slug (Archive Posttype page).

    We’ll use Formota theme as example and change slug of Posttype Video:

    For easily to manage files you can install this plugin: https://wordpress.org/plugins/file-manager-advanced/

    Step 1: Go to wp-content/plugins/haru-formota-core/includes/posttypes/ then open file video.php

    Step 2: Change video slug please see line 75. You need change code here:

    'slug' => 'video',

    change to:

    'slug' => 'haru-video', // You can change to an other slug

    Step 3: Go to Settings -> Permalink and re-save.

    You can do similar when change video-category & video-tag slug

    Step 4: If you don’t want to show archive custom posttype page you can change the code on line 69 from:

    'has_archive' => true,

    to

    'has_archive' => false,

    Maybe you need re-save permalink options.

    Hope this help you!

     

    *****

    Best regards,

    HaruTheme

    • This topic was modified 4 years, 2 months ago by admin.
    • This topic was modified 4 years, 2 months ago by admin.
    • This topic was modified 6 months ago by admin.
    #6358
    Efeulker
    Support Expired

    Hi,

    I did steps of 1 and 2 but on third step, Permalinks page hasn’t have the custom base settings. How can I active it?

    Thanks in advance

    #6359

    Hi Efeulker,
    When you did step 1 and 2 you already changed slug and need click Save Permalink is enough for make sure slug update in database.
    The fields you see above are from WordPress core and WooCommerce.

    ****
    Regards,
    HaruTheme.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.