I have a strange display and I don’t know how to display it correctly.
When entering the link looks ok. But after saving it will be a long cryptic link.
In the frontend everything works and looks good.
Where is the mistake?
Backend Picture
Below is the code
function darkteaser_vc_map_init() {
$settings = array(
'name' => __( 'kleine Teaserbox mit Bild', 'js_composer' ), // shortcode name
'base' => 'my_darkteaser_element', // shortcode base [my_darkteaser_element.php]
'category' => __( 'Meine Elemente', 'js_composer' ), // param category tab in add elements view
'icon' => get_template_directory_uri() . '/image/darkteaser.png', // Simply pass url to your icon here
'description' => __( 'kleine Teaserbox mit Bild und Text', 'js_composer' ), // element description in add elements view
'show_settings_on_create' => false,
// don't show params window after adding
'weight' => - 5,
// Depends on ordering in list, Higher weight first
'html_template' => dirname( __FILE__ ) . '/vc_templates/my_darkteaser_element.php',
// if you extend VC within your theme then you don't need this, VC will look for shortcode template in "wp-content/themes/your_theme/vc_templates/my_darkteaser_element.php" automatically. In this example we are extending VC from plugin, so we rewrite template
'front_enqueue_css' => preg_replace( '/s/', '%20', plugins_url( 'assets/front_enqueue_css.css', __FILE__ ) ),
// This will load extra css file in frontend editor (when you edit page with VC)
'params' => array(
array(
'type' => 'attach_image',
'class' => 'teaserboxPicDunkel',
'heading' => __( 'Bild auswählen', 'js_composer' ),
'param_name' => 'bildteaser',
'value' => __(''),
'description' => 'Bild für Teaserbox hinzufügen.'
),
array(
'type' => 'textarea_html',
'holder' => 'div',
'class' => 'teaserboxtextDunkel',
'heading' => __( 'Text eingeben', 'js_composer' ),
'param_name' => 'content', //param_name for textarea_html must be named "content"
'value' => __( '', 'js_composer' ),
'description' => __( 'Text für Teaserbox.', 'js_composer' )
),
array(
'type' => 'vc_link',
'holder' => 'div',
'class' => 'teaserboxbuttonDunkel',
'heading' => __( 'Link setzen', 'js_composer' ),
'param_name' => 'linkteaser',
'value' => __( '', 'js_composer' ),
'description' => 'Link zur Seite'
),
)
);
vc_map( $settings );
}
add_action(‘vc_after_init’, ‘darkteaser_vc_map_init’);