• Resolved jonny-s

    (@jonny-s)


    Hi, I wan to display the management site as part of another page (in my case UsersWP account-management-site). How to get management-site shortcode-like (means return just it’s content-part, without template around?

    I’ve read the wiki about create a real management page, but didn’t got it to work.

    My code is this:

    function uwp_account_form_display_cb($type){
    	if ( $type == 'stcr' ) {
    		//echo 'Your custom content goes here...';
    		if ( isset ( $wp_subscribe_reloaded ) ) {
    			global $posts; $posts = $wp_subscribe_reloaded->stcr->subscribe_reloaded_manage();
    			if ( have_posts() ) : while ( have_posts() ) : the_post();
    		}
    	}
    }
    

    UsersWP Reference
    UsersWP Account-Page-tab will have address like /account/?type=stcr

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WPKube

    (@wpkube)

    Hi @jonny-s

    There’s a shortcode called [stcr_management_page] that can be used.

    If placing it in the code then it would be:

    echo do_shortcode( '[stcr_management_page]' );

    But it relies on being located on a page that’s specifically meant for the STCR management, I’m not sure if it’ll work out for the UsersWP management page.

    Thread Starter jonny-s

    (@jonny-s)

    Hi, thank you for the code!

    Works perfectly, if management-page set in settings differs from where I used the shortcode. The page set up in settings will have the template of StCR, but the shortcode itself displays just the working form.

    Regards

    Thread Starter jonny-s

    (@jonny-s)

    or even deactivate the corresponding option in settings to link to the page of shortcode without getting StCR’s template applied. :’D

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Management Site as shortcode like return’ is closed to new replies.