Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #19837

    Is there a way to disable the “Recent Posts” widget? I am trying to use a different widget for displaying this with additional options. The recents posts widget seems to block the other plugin from working.

    Thanks for the prompt reply, I have a client waiting.

    Brent

    #105214

    Hi,

    Go to Appearance > Widgets, remove the Recent Posts widget.

    Regards,

    Ismael

    #105215

    Ismael,

    I need to remove it from the template!

    It interferes with a more advanced plugin that is similar but has more options. How do I disable or remove that php code from the theme?

    Sorry I wasn’t specific enough.

    Thanks for the reply,

    Brent

    #105216

    Hi,

    Not sure if this is what you want but this will remove the widget areas and of course the Recent Posts widget.

    Go to includes > admin, edit register-widget-area.php. Remove and replace everything with this code.

    <?php
    // global $wp_registered_sidebars;
    #########################################

    if ( function_exists('register_sidebar') )
    {
    $sidebars_to_show = array(''); // ('.$sidebar.')

    foreach ($sidebars_to_show as $sidebar)
    {

    }

    foreach ($sidebars_to_show as $sidebar)
    {

    }

    foreach ($sidebars_to_show as $sidebar)
    {

    }

    //dynamic widgets

    #footer
    $footer_columns = avia_get_option('footer_columns','5');

    for ($i = 1; $i <= $footer_columns; $i++)
    {
    register_sidebar(array(
    'name' => 'Footer - column'.$i,
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '<span class="seperator extralight-border"></span></div>',
    'before_title' => '<h3 class="widgettitle">',
    'after_title' => '</h3>',
    ));
    }

    #extra widgets for pages
    $id_array = avia_check_custom_widget('page', 'ids');

    if(isset($id_array[0]))
    {
    foreach ($id_array as $page_id)
    {
    foreach ($sidebars_to_show as $sidebar)
    {
    if($page_id != "")
    register_sidebar(array(
    'name' => 'Page: '.get_the_title($page_id).'',
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '<span class="seperator extralight-border"></span></div>',
    'before_title' => '<h3 class="widgettitle">',
    'after_title' => '</h3>',
    ));

    }
    }
    }

    #extra widgets for categories
    $id_array = avia_check_custom_widget('cat', 'ids');

    if(isset($id_array[0]))
    {
    foreach ($id_array as $cat_id)
    {
    foreach ($sidebars_to_show as $sidebar)
    {
    if($cat_id != "")
    register_sidebar(array(
    'name' => 'Category: '.get_the_category_by_ID($cat_id).'',
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '<span class="seperator extralight-border"></span></div>',
    'before_title' => '<h3 class="widgettitle">',
    'after_title' => '</h3>',
    ));

    }
    }
    }

    #extra widgets for categories
    $name_array = avia_check_custom_widget('dynamic_template');

    if(isset($name_array))
    {
    foreach ($name_array as $name)
    {
    if($name != "")
    register_sidebar(array(
    'name' => 'Dynamic Template: Widget '.$name,
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '<span class="seperator extralight-border"></span></div>',
    'before_title' => '<h3 class="widgettitle">',
    'after_title' => '</h3>',
    ));

    }
    }

    }

    function avia_dummy_widget($number)
    {
    switch($number)
    {

    }
    }

    Regards,

    Ismael

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

The topic ‘How to disable "Recent Posts" widget?’ is closed to new replies.