• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Category Block Drop Down

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Category Block Drop Down

This topic is: not resolved

Tagged: Blocks, category

  • This topic has 3 replies, 3 voices, and was last updated 2 years, 2 months ago by Anita.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • March 11, 2020 at 10:15 am #497269
    danielleB
    Participant

    I'm using the following Category Blocks Drop Down code available in Gutenberg blocks (widget), but it lists all categories, and I would like to list only certain categories under a parent category. I tried tweaking the code to specify the parent category slug, but of course, that didn't work. Is it doable without having to modify the function file?

    <!-- wp:categories {"displayAsDropdown":true,"showPostCounts":true} /-->;

    Thanks,


    Danielle

    http://danielleb8.sg-host.com/nos-membres/
    March 11, 2020 at 2:32 pm #497273
    Victor Font
    Moderator

    The category block is from WordPress Core. It has nothing to do with the Genesis Framework or Studio Press themes.

    WordPress does have a filter that may help, but you'll have to get specific help from a WordPress support group. Here is a link to the filter: https://developer.wordpress.org/reference/hooks/widget_categories_dropdown_args/


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    March 11, 2020 at 3:05 pm #497275
    danielleB
    Participant
    This reply has been marked as private.
    March 11, 2020 at 3:48 pm #497277
    Anita
    Keymaster

    @danielleB I have a snippet that works for excluding from the drop down. Add this to the functions.php file and change the numbers to the ones you want to exclude.


    Love coffee, chocolate and my Bella!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2022 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble