Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #25983

    Hi,

    I’ve used the global option in Enfold settings to disable the socket.

    All of my pages are set to show footer and socket (standard setting), so my question is: does the global setting overwrite it?

    It seems not, because the socket ist still showing up.

    Is this a bug?

    Website: http://goo.gl/RtefM (currently with DISABLED socket)…

    #128885

    Hi,

    no, this is not a bug. If you investigate the code in footer.php you’ll notice following lines:

    $footer 				= get_post_meta($the_id, 'footer', true);
    $footer_widget_setting = !empty($footer) ? $footer : avia_get_option('display_widgets_socket');

    We first check if a custom post meta value is set and if not we’ll use the default option. Probably you already set/saved the post meta option for all pages and thus the general option won’t take effect.

    #128886

    Thanks Dude,

    thought so. I would recommend using the global setting should ignore the individual ones. Logical stuff…

    :)

    Update:

    Doesn’t work. If I create a new page, the standard setting for the footer is “Display the footer widgets & socket”. Checked all of my pages (currently around 150) – same settings everywhere.

    So a global option should always regardless overwrite any individual setting. Should be fixed!

    #128887

    Another update: there seems to be a real bug.

    I echo’ed out the values for $footer_widget_setting and $footer – both say “all”.

    My global setting is still “nosocket”.

    So I changed the modal and set it to

    $footer_widget_setting = !empty($footer) ? avia_get_option('display_widgets_socket') : $footer;

    This won’t be the right way, but it does the trick for me.

    Others may try

    $footer_widget_setting = avia_get_option('display_widgets_socket');

    This requires always the global setting ignoring ANY individual one.

    #128888

    Hi formateins,

    I’ll tag Kriesi to take a look as well as Peter. Glad you found a fix for the time being however.

    Regards,

    Devin

    #128889

    thought so. I would recommend using the global setting should ignore the individual ones. Logical stuff…

    I”m sorry formateins but that’s wrong and your solution is not logical at all. If the “global settings” overwrite the individual post meta settings you can’t use the individual settings anymore because regardless of the configured post meta value the “global settings” will overwrite the individual settings.

    However normally the “Default Layout – set in Enfold > Layout & Options” option should always be selected as the default dropdown option and in your case the “Display the footer widgets & socket” value is selected which seems to be a leftover on your server (the first versions of Enfold used the global settings to select the right value in the metabox dropdown). Try to add following code to the end of functions.php to reset all values:

    add_action( 'admin_init', 'avia_remove_meta');
    function avia_remove_meta()
    {
    $post_types = array('post','page','portfolio');
    $count = 0;

    //iterate over each post type
    foreach($post_types as $type)
    {
    //get all posts of a certain type
    $the_query = new WP_Query( array('post_type' => $type, 'posts_per_page'=>-1) );

    //check if any post were retrieved
    if(!empty($the_query->posts))
    {
    //iterate over each post and check if the post has a gallery key
    foreach($the_query->posts as $entry)
    {
    //since there might be hundreds of posts make sure php doesnt time out
    @set_time_limit(45);
    $success = delete_post_meta($entry->ID, 'footer', true);
    }

    }
    }
    }

    #128890

    Maybe I didn’t express it correctly. A global setting should always applied, if no individual setting is done. Unfortunately, a individual setting is applied by default when creating a new page/post/portfolio entry. There’s simply a “Default” with no value missing in post meta box. :)

    I’ve been thinking to do the replace straight within the database, but for now I’ll leave this as is. Obviously, this wastes a lot of time and could be done by a simple display:none to the socket.

    Thanks for getting into it – I’ll save the snippet to my wiki. :)

    #128891

    But there’s an “empty value” which will be used as default value – compare wp-contentthemesenfoldconfig-templatebuilderavia-template-builderconfigmeta.php

    array(

    "slug" => "layout",
    "name" => "Footer Settings",
    "desc" => "Display the footer widgets?",
    "id" => "footer",
    "type" => "select",
    "std" => "",
    "class" => "avia-style",
    "subtype" => array(
    "Default Layout - set in ".THEMENAME." > Footer" => '',
    'Display the footer widgets & socket'=>'all',
    'Display only the footer widgets (no socket)'=>'nosocket',
    'Display only the socket (no footer widgets)'=>'nofooterwidgets',
    'Don't display the socket & footer widgets'=>'nofooterarea'
    ),

    I know that some of the older versions used the global settings to preselect the right value in the metabox dropdown but since Enfold 1.5 or so this is not the case anymore.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Global setting for Socket’ is closed to new replies.