Create Custom Permalinks for Posts without Changing Custom Post Type URLs

Customising the permalink structure in WordPress can enhance SEO and improve the user experience. This updated guide focuses on modifying the permalink structure for standard posts without affecting the URLs of Custom Post Types (CPTs) using the Advanced Custom Fields (ACF) plugin, which now includes CPT options.

Step-by-Step Guide

1. Backup Your Site

Before making any changes, ensure you have a complete backup of your WordPress site, including the database and files.

2. Update Posts Permalink Structure

First, update the permalink structure for standard posts:

  1. Access Permalink Settings:
    • Go to your WordPress dashboard and navigate to Settings > Permalinks.
  2. Set a Custom Structure for Posts:
    • Choose Custom Structure and enter your desired format. For example, /blog/%postname%/ will set the permalink to include “blog” before the post name.
  3. Save Changes:
    • Click Save Changes to update the permalink structure.

3. Configure Custom Post Type (CPT) Permalinks using ACF

With the 2024 update, ACF now includes options for managing CPTs directly. To ensure CPT permalinks remain unchanged, follow these steps:

  1. Access ACF CPT Settings:
    • In the WordPress dashboard, navigate to Custom Fields > Post Types.
  2. Select Your CPT:
    • Click on the CPT you want to update.
  3. Turn Off Front Prefix URL:
    • In the settings for your CPT, turn off the option for the front prefix URL. This ensures that the CPT URLs do not include any unwanted prefixes.
  4. Update URL Slug:
    • Set the URL slug to your desired value for the CPT. This allows you to customize the slug specific to each post type without affecting the overall permalink structure for posts.
  5. Save Changes:
    • Save the changes to ensure the new permalink settings are applied.

4. Flush Your Caching Plugin

After updating the permalink settings and configuring the CPT URLs, flush any caching plugin you have installed to apply the new settings. This ensures that the changes are immediately reflected on the front end.

5. Test the New Permalink Structure

Create a new post and a new CPT entry to ensure the custom permalink structure is working correctly for both.

Additional Tips

  • Redirection: If you are changing existing permalinks, use a redirection plugin to manage 301 redirects from old URLs to the new ones. This helps maintain SEO rankings and avoids broken links.
  • SEO Considerations: Custom permalinks can improve your SEO by making URLs more descriptive. Avoid frequent changes to maintain search engine rankings.

Troubleshooting

  • 404 Errors: If you encounter 404 errors, ensure you have flushed your caching plugin. This usually resolves the issue.
  • Plugin Conflicts: Ensure no other plugins are conflicting with your custom permalink structure. Deactivate other plugins temporarily to identify any conflicts.

By following these steps, you can successfully create custom permalinks for your posts while keeping the URLs for your custom post types intact using the updated ACF plugin.

Read More

Get Started!

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.