• Resolved weboosteg

    (@weboosteg)


    I’ve an issue that the plugin doesn’t accept Arabian slugs and it keep turning them into ___ underscores see; https://i.ibb.co/b5KB3p1p/Screenshot-from-2025-07-08-15-53-54.png

    I fixed this on some levels from the Archive: True giving it custom slug ( it accepted the arabic) and then Custom Rewrite Slug (it accepted the arabic).

    so I fixed it visually for the visitors on front end whether they want to access the archive page or read the full url in arabic in for every car but the issue remains for Google and SEO that the sitemap url is still website.com/_____-sitemap.xml

    so I need a solution for the main slug on whether to write it in arabic or the sitemap url to follow the custom written slug for that CPT otherwise it ruins the seo

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I’m double checking just to make sure, but I’m suspecting that the Must not exceed 20 characters and may only contain lowercase alphanumeric characters, dashes, and underscores detail would be enforced even if we weren’t also aiding enforcing with javascript.

    The rewrite spots sound like they have you MOSTLY covered and the public facing parts are as expected/needed, it’s just the post type key that is probably expected to be in latin.

    Would be curious if things went differently with use of the “Get Code” tab for this post type, and temporarily manually registering a post type key using Arabic characters. You can find that tab at https://mlotfycarrental.com/wp-admin/admin.php?page=cptui_tools&action=get_code and it can be pasted into your theme’s functions.php file.

    Thread Starter weboosteg

    (@weboosteg)

    I pasted this in the functions.php and nothing happened

    function cptui_register_my_cpts_عربيه() {

    /**
    * Post Type: عربيه.
    */

    $labels = [
    "name" => esc_html__( "عربيه", "woodmart" ),
    "singular_name" => esc_html__( "عربيه", "woodmart" ),
    ];

    $args = [
    "label" => esc_html__( "عربيه", "woodmart" ),
    "labels" => $labels,
    "description" => "",
    "public" => true,
    "publicly_queryable" => true,
    "show_ui" => true,
    "show_in_rest" => true,
    "rest_base" => "",
    "rest_controller_class" => "WP_REST_Posts_Controller",
    "rest_namespace" => "wp/v2",
    "has_archive" => "عربيه",
    "show_in_menu" => true,
    "show_in_nav_menus" => true,
    "delete_with_user" => false,
    "exclude_from_search" => false,
    "capability_type" => "post",
    "map_meta_cap" => true,
    "hierarchical" => false,
    "can_export" => false,
    "rewrite" => [ "slug" => "عربيه", "with_front" => true ],
    "query_var" => true,
    "menu_icon" => "dashicons-car",
    "supports" => false,
    "show_in_graphql" => false,
    ];

    register_post_type( "عربيه", $args );
    }

    add_action( 'init', 'cptui_register_my_cpts_عربيه' );
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    If nothing happened, then i assume that first listed “Post Type Slug” is going to have to be in latin characters rather than Arabic.

    Thread Starter weboosteg

    (@weboosteg)

    Hello @tw2113 I wonder if I can create a CPT UI under a specific language? lets assume I have /ar by Polylang how can I create a CPT UI that’s ar based? because now CPT creates general tab and then from inside it you choose the article language which makes the CPT archive link loyalty to the main domain and not the subdirectory of that language. So, is there a possibility for the CPT to be under a specific language so the archival link of it really works? as when its under the main domain the archive link will always be empty because the posts or pages is already assigned to a language that needs a /AR after the .com but the archival link remains .com/archive because the CPT itself doesn’t understand that this archival is for a specific language. Also, that makes an issue in the sitemap as it displays the empty archival link and not the correct one that should have the /ar/ after the .com then the archival slug. For now I’m solving it temporarily by cloudflare 301 redirect. Is there a real solution for this?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I believe in general you can register the post type in whatever default language you want, it’s just that this field specifically needs to be in latin:

    Screen Shot

    Labels can be in whatever language, and permalink slugs are meant to be translation ready.

    We try to do our best for PolyLang/WPML/etc support, but I know we also store label data, etc, as part of saved options making them a little bit hard to get to for those other plugins.

    In terms of content created in the post types and taxonomies registered, those should be fully accessible from the translation plugins.

    Have you reached out to PolyLang support for some of these questions? We’re more than willing to help think through how to try and achieve what you’re needing, but I’m not 100% sure which plugin would be in charge of which parts.

    Ultimately the primary purpose of CPTUI is to collect the arguments that get passed to register_post_type() and register_taxonomy().

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Any news or changes here @weboosteg ?

    Thread Starter weboosteg

    (@weboosteg)

    if you are talking about the translation well, the solution is there in paid versions (confirmed) so the issue isn’t in your or their side its only on client side if he don’t want to pay.

    also for the speed issue not sure if I mentioned here its not related to you or translation plugins it was a wrong caching setup.

    so in short, both issues is on the client side whether a setup or getting pro sub

    thanks for asking all good now

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Thanks for the followup, and let us know if you need anything else.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘AR issue’ is closed to new replies.