Support » Plugin: WP Better Permalinks » 404 error in AMP

  • I enabled WordPress AMP for custom post type. But when activate your plugin, amp links gives 404 not found.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @wpuzman,

    Thank you for your message.

    I will be happy to help you. I will be happy to help you. Can I ask you for cooperation?

    I created a test environment for you. Please try to repeat your issue and describe me step by step what you did. I will be grateful for your help!

    Here are login details:

    https://demo-03.gbiorczyk.pl/wp-login.php
    wpuzman
    E9J8jP5@Ro0z#wR^6C!4b94*

    Thank you in advance!

    wpuzman

    (@wpuzman)

    Any news 🙂 ? I am waiting for your response.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    No, I am asking you for a little patience. Thanks a lot for your cooperation, but I’m not working on the plug 24 hours a day. I will inform you about the progress.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @wpuzman,

    I am so sorry for the long waiting time, but I had a lot of responsibilities. I have released a plugin update which adds two new filters which may solve your problem.

    Please download the latest version of the plugin, and then add the following code to the functions.php file in your theme:

    add_filter('wbp_rewrites_rules/post_type', function($rules, $postType, $path)
    {
      return [
        $path . '(/([^/]+))+/amp/?$' => 'index.php?post_type=' . $postType . '&name=$matches[1]&amp=',
      ] + $rules;
    }, 10, 3)

    Please let me know if this solved your problem.

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