• Resolved zokkoz

    (@zokkoz)


    Hi!

    As you know it, the clean permalink on a multisite environment is /blog/%postname%/. Since I installed a multisite environment I have a /blog/ prefix in the regular blog posts clean permalink. After I added MasterStudy, the course permalink always has the /blog/ prefix (ex: https://mysite.com/blog/course-page/sample-course, how do I stop that and make the course page https://mysite.com/course-page/sample-course? Because it does not make any sense to have a /blog/prefix in a course permalink.

    By the way, a plugin like LearnPress seems to have that fixed: on multisite or note, the permalink remains /courses/ instead of being /blog/courses/. (But I prefer to use MasterStudy, if I can have this /blog/ prefix thing fixed. Can you please fix that? In the meantime, can you please provide me with a code that could remove the /blog/ prefix while you’re working on removing it natively?

    I have a piece of code, but it’s for TutorLMS, how can you please help me fix it and make it work for MasterStudy…

    function fix_multisite_course_slug() {
    $args = array(
    ‘public’ => true,
    ‘has_archive’ => true,
    ‘rewrite’ => array(
    ‘slug’ => tutor_utils()->get_option( ‘course_permalink_base’, ‘courses’ ),
    ‘with_front’ => false,
    ),
    );
    register_post_type( ‘courses’, $args );
    }
    add_action( ‘init’, ‘fix_multisite_course_slug’ );

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support mgordonStylemixThemes

    (@mgordon7)

    Hello,

    Thank you for reaching out,

    This is how Multisite works by default and the /blog/ slug can be removed from the Network settings.

    To remove the /blog/ slug from your WordPress multisite, you can adjust the network settings without needing code or plugins.

    Here’s how you can do it:Steps to Remove the /blog/ Slug in WordPress Multisite:

    1. Log in to your WordPress Network Admin.
    2. Go to SettingsNetwork Settings.
    3. Scroll down to the Permalink Structure section.
    4. You will see a setting called “Remove /blog/ slug” under Permalink Structure for subdirectory sites. Enable this option.
    5. Save your changes.

    Best regards

    Thread Starter zokkoz

    (@zokkoz)

    Hi!

    Thanks for your reply. But the thing is that I have so many blog articles already published and ranking with the /blog/ slug prefix that removing the /blog/ prefix would result and SEO issues. So, is there any chance you can provide with some code to fix that, or preferably you fix that in upcoming update of the plugin so that we can have course related URL without the /blog/ prefix when plugin is install on multisite network main site?

    Thanks in advance,

    Kindly.

    Plugin Support mgordonStylemixThemes

    (@mgordon7)

    Hello,

    Unfortunately, I am not able to provide any custom scripts here, what you are asking doesn’t relate to the LMS plugin default settings and options at the moment

    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.