Viewing 2 replies - 1 through 2 (of 2 total)
  • Anonymous User 632843

    (@anonymized-632843)

    I would be happy to know about this as well.. ??

    Plugin Author tombenner

    (@tombenner)

    Which admin page would you like to show? There unfortunately isn’t a simple switch that would allow you to show an existing admin page on the front-end, as the admin pages usually require all of the admin functionality to be loaded, and loading all of that is generally a bad idea for many reasons (page load speed, possible conflicts, etc).

    To add a page to the front-end using Front-End Users, you’ll probably need to be a little familiar with PHP. As an example, to add a page named “My Page” that has the URL https://mysite.com/profile/my-page, you would put the following in your theme’s functions.php:

    add_filter('feu_settings', 'change_feu_settings');
    function change_feu_settings($settings) {
    	$settings['views'] = array(
    		'index' => array(
    				'title' => 'Settings',
    				'file' => 'settings'
    			),
    		'my-page' => array(
    				'title' => 'My Page'
    			)
    	);
    	return $settings;
    }

    To create the content of the “My Page”, you would make a file in plugins/front-end-users/views/ named “my-page.php” that contains PHP code like this:

    <?php feu_header(); ?>
    
    <?php feu_box_(); ?>
    
    	<h1>My Page</h1>
    
    	<p>Some content here...</p>
    
    <?php _feu_box(); ?>
    
    <?php feu_footer(); ?>

    For details on how to configure these pages (which Front-End Users refers to as “views”), please see the comments near the “change_feu_settings” function in front-end-users/example_hooks.php.

    Front-End Users also provides a number of functions that can be useful in these views. They are listed and described in front-end-users/functions.php.

    Hope this helps; definitely let me know if anything seems unclear or if you have any other questions.

    Best,
    Tom

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Front-End Users] How to customize other user-specific pages ?’ is closed to new replies.