Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter timolookingforanswers

    (@timolookingforanswers)

    I have wrote a function for a shortcode that delivers the url I want to link at.

    function custom_shortcode_func1() {
    	ob_start();
    	$current_user = wp_get_current_user();
    	return 'https://dein-sachsenheim.de/wp-admin/post.php?post=' . $current_user->wwp3_contact_sponsor_id . '&action=edit';
    	$output = ob_get_clean();
        return $output;
    }
    add_shortcode('site_url', 'custom_shortcode_func1');

    But the Divi text modul does not translate the shortcode in the link url. This would be the best solution. Now I use a href link with the shortcode an it works.

    Thread Starter timolookingforanswers

    (@timolookingforanswers)

    The plugin for the dashboard is from divilife. But its a normal site build with the theme builder. The left menu is the normal WordPress menu. My problem is I want to have a link that dynamically leads to the members page. I have now set up a shortcode that deliver the url. But I can not find a solution how to use the shortcode in a link or button.

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