ThemeShaper Forums » Thematic

Only show 2 widgets in primary aside & not the default link, rss & meta widgets?

(16 posts)
  • Started 5 years ago by jimg
  • Latest reply from Chris
  • This topic is resolved

Tags:

  1. jimg
    Member

    Hi,

    (0.9) Noticed that if I add a widget to the primary aside, some widgets (links, rss & meta) still appear on the rendered page even though they were not specifically added to the primary aside. I only want the widgets I select to appear in the primary aside. Any suggestions on how to accomplish?

    Posted 5 years ago #
  2. You're still getting the Secondary Aside .. for the moment you can move the last of your widgets listed for the Primary Aside to the Secondary Aside .. or use


    #secondary {
    display: none;
    }

    in your CSS. There will be a function to remove Primary or Secondary Aside in the future.

    Cheers,

    Chris

    Posted 5 years ago #
  3. jimg
    Member

    links, rss & meta appear in the secondary aside when no widget is specified for that location. I "could" add in a blank text widget in the secondary aside & deal with a single empty block, but that's not the optimal sol'n.

    Posted 5 years ago #
  4. jimg
    Member

    Thanks Chris. I don't want to remove the secondary aside - would rather control how it gets populated. Using display:none give me bad SEO mojo. Perhaps with this new remove function could be a "auto populate empty asides" checkbox in the thematic options page?

    Posted 5 years ago #
  5. Don't know if this will make into the theme-options.php .. I'm a friend of filters, which will give the designer more control over his child theme and its settings especially if he's going to create something special for a single customer.

    Cheers,

    Chris

    Posted 5 years ago #
  6. There's nothing bad with using display:none, SEO-wise. Google simply ignores whatever is set to display:none. You won't be penalized for using it.

    Posted 5 years ago #
  7. jimg
    Member

    Chris / Ian: can you advise on how I can do this in a conditional manner? If no widget is assigned for this particular block (primary aside, secondary aside)in this page, then don't display the block at all.

    Posted 5 years ago #
  8. Ok .. instead of original plan to switch off primary or seconday asides using filters .. we can provide a autofill-with-widgets function that can be filtered in a future release .. so it's up to you to use the pre defined widgets, replace these with your own selection or remove selection .. all this functionality will be controlled by your child theme's function.php.

    Cheers,

    Chris

    Posted 5 years ago #
  9. Let me see, if there's a way to do this with the current release.

    Posted 5 years ago #
  10. Try copying the Thematic sidebar.php into your Child Theme folder and deleting all the content inside of div#secondary in your Child Theme copy.

    Posted 5 years ago #
  11. :-) .. even better .. try this in your functions.php ..


    function conditional_sidebar () {
    if (!is_sidebar_active('primary-aside') ): ?>
    <STYLE type="text/css">
    #primary { display: none }
    </STYLE>
    <?php
    endif;
    if (!is_sidebar_active('secondary-aside') ) : ?>
    <STYLE type="text/css">
    #secondary { display: none }
    </STYLE>
    <?php
    endif;
    }
    add_action('wp_head', 'conditional_sidebar');

    .. quick and dirty .. but it works ;-)

    Cheers,

    Chris

    Posted 5 years ago #
  12. jimg
    Member

    Thanks Chris - that works.

    Posted 5 years ago #
  13. Hiding stuff with display none is dangerous from an SEO perspective. Personally it is only acceptable (when it contains content) when there are obvious navigation controls set to enable the contents to later be displayed, such as in various navigation menus.

    If the div is empty, you can also probably get away with it

    Posted 5 years ago #
  14. Andy,

    with the next release we'll have a different way to preset widgets. With that new functionality you can remove the preset widgets using your functions.php.

    Cheers,

    Chris

    Posted 5 years ago #
  15. It was really just commenting in general, as I have seen "display none" suggested as a solution for a number of problems, and it really isn't a solution.

    Posted 5 years ago #
  16. :-) .. I don't like display:none too

    Posted 5 years ago #

RSS feed for this topic

Reply

You must log in to post.