Jump to content

Archived

This topic is now archived and is closed to further replies.

respectgb

set blogdescription and blogname from pagelines dms front end admin panel

Recommended Posts

respectgb

Hi,

 

Hopefuly someone here can help me on my quest, I have managed to add an admin panel under the "global options" for my clients to use for extended options and also remove any elements that I don't want them to see based on their user level (all is great so far).

 

However, what I'm wanting them to be able to edit is the 'blogname' and 'blogdescription' for their sites, I have managed to get the 'blogname' and 'blogdescription' to interact (clear the fields in the dabase - argh!) using the following action, but it doesn't actually take into account the $settings array that I have created.

add_action( 'pl_sorted_settings_array', 'save_extra_blog_options' );

function save_extra_blog_options( $settings ) {

    update_option( 'blogname', $_POST['blogname'] );
    update_option( 'blogdescription', $_POST['blogdescription'] );
}

I have copied and pasted the code that I am using to create the admin panel below:

add_filter('pl_sorted_settings_array', 'add_global_panel2');
function add_global_panel2($settings){
    $settings['privacy'] = array(
        'name' => 'Blog Name',
        'icon' => 'icon-eye-open',
        'opts' => array(
            // Regular Options Engine
            array(
    		'id' => 'blogname',
  		'type' => 'text',
                'label' => 'blog Name',
	    ),
            // Regular Options Engine
            array(
                'id'   => 'blogdescription',
  		'type' => 'text',
                'label' => 'blog description',
            ),
        )
    );
    // Finally we return the new array
    return $settings;
}

Really hope you guys can help!!

 

Thanks in advance!

Share this post


Link to post
Share on other sites
Danny

Hi,

Are you referring to the Wordpress Administrator Dashboard > Settings > General > Site Title and Site Description ?

If so, why are not just allow them to change the options ?


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
respectgb

Danny,

 

Thanks for the prompt response!

 

Yes, I'm referring to the same settings that you mentioned, the reason that I want to add this to the front end is; that I'm setting up a site for a client so that it will not require them to ever visit the wp-admin dashboard as there is no need for posts or page content in my setup (just using pagelines sections for various content blocks) on predefined pages.

 

Thus I'm wanting to make the admin experience for them on the frontend only, and this is one feature that they have requested that they should be able to change as they wish.

 

Hope this all makes sense.

 

Thanks

 

Luke

Share this post


Link to post
Share on other sites

  • Similar Content

    • Bleuy
      By Bleuy+
      How can I get support on pagelines DMS? The product isn't that old and my skeleton themes aren't working and I can't get support in the same way? 
    • Bleuy
      By Bleuy+
      I have a number of legacy websites that are running on the above version of Pagelines DMS, where the template has stopped working. I am using a skeleton theme to all of them. What do I need to do to rectify this.
       
       
    • Steve Webb
      By Steve Webb+
      I am having an issue with DMS editor not loading.  Just keeps spinning and spinning.
      Have tried several things - Logged in and out, cleared cache, deactivated all plugins, but the issue persists.
      I even had our host restore from a backup a few weeks ago, when I know it WAS working, as I edited a text box on the homepage.  The restore from backup didn't help either.
      Also, the front end of the site shows that the site is framed, or boxed now (whatever you call it), instead of full width as it was previously (last week).
      Dev console shows that there are php errors in Google maps - file is attached.
      Can someone please help?  Not sure what else I can do here...
      Thanks in advance.
      -Matt

    • tuciudadenred
      By tuciudadenred+
      Hi everyone, what happens is that the web page metrosalarmas.com has a google tags which I have not attacked where I can look to remove those tags and be able to locate the correct ones.
    • Steve Webb
      By Steve Webb+
      I am having an issue with DMS editor not loading.  Just keeps spinning and spinning.
      Have tried several things - Logged in and out, cleared cache, deactivated all plugins, but the issue persists.
      I even had our host restore from a backup a week ago, when I know it WAS working, as I edited a text box on the homepage.  The restore from backup didn't help either.
      Also, the front end of the site shows that the site is framed, or boxed now (whatever you call it), instead of full width as it was previously (last week).
      Dev console shows that there are php errors in Google maps - file is attached.
      Can someone please help?  Not sure what else I can do here...
      Thanks in advance.
      -Matt

×