text_url automatically adding “s” to “http:” when it shouldn’t
-
First, I absolutely LOVE this product, though i don’t use it as a plugin. Regardless, I have a “Brands” custom post type that asks for a URL for that specific company. The link in questions (https://patrickind.com/brands/sigma-wire-international/) does not connect correctly to their website because it automatically adds an “s” to the “http:” and this particular site does not need it. Here is my code for that field:
// Brand Link $cmb = new_cmb2_box( array( 'id' => 'brand_metabox', 'title' => __( 'Brand Link', 'cmb2' ), 'object_types' => array( 'brands', ), // Post type 'context' => 'normal', 'priority' => 'high', 'show_names' => true, // Show field names on the left // 'cmb_styles' => true, // Enqueue the CMB stylesheet on the frontend ) ); $cmb->add_field ( array( 'name' => __( 'Website URL', 'cmb2' ), 'desc' => __( 'Enter the web address for this brand', 'cmb2' ), 'id' => $prefix . 'brand_link', 'type' => 'text_url', 'protocols' => array( 'http', 'https'), // Array of allowed protocols ) ); }
I checked my functions file to make sure i didn’t add anything that WOULD force that “s” to appear but found nothing there.
Is there a way to adjust this? Almost all other Brands do in-fact require the “s” to be there, but in this particular case it can’t be there. Whenever I manually remove the “s” from the text_url field and then update the page, the “s” reappears.
I’m not sure how to correct that. Can you offer any suggestions?
Please and thank you!
- This topic was modified 4 years, 4 months ago by .
- This topic was modified 4 years, 4 months ago by .
- This topic was modified 4 years, 4 months ago by .
- This topic was modified 4 years, 4 months ago by .
- This topic was modified 4 years, 4 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘text_url automatically adding “s” to “http:” when it shouldn’t’ is closed to new replies.