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

    • 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

    • JawDesigns
      By JawDesigns
      Hi everyone,
      Flywheel have reported errors on my clients site 'www.racewaredirect.co.uk' and it's not loading. Can someone please provide some information on how to fix this? The site has never experienced these issues before.
      Thanks,
      James Wilson
    • MissT
      By MissT+
      Hi there,
      I've got an issue with 3 websites built with DMS since I migrated them from http to https that I need help with please.
      When any changes are made - e.g. new posts added or existing posts amended - certain sections of the live site seem to break e.g. image headers hang and don't load (b/g on canvas section), sliders hang and don't load (Revslider), flipper section doesn't load.
      Logging in and then clicking 'Edit the site using DMS' seems to fix the problem. Often if I try to open up another browser window to edit the site / re publish I'm unable to as the page wont load / hangs while trying to load.
      Any ideas how to fix this? On a couple of the sites I've installed a caching plugin as I thought it might be a loading speed issue but it's still happening.
      Website URL's can be provided privately.
      Many thanks in advance.
×