{"id":3576,"date":"2020-10-16T14:08:00","date_gmt":"2020-10-16T14:08:00","guid":{"rendered":"https:\/\/purelysupp.com\/wordpress\/?p=3576"},"modified":"2022-10-16T14:47:02","modified_gmt":"2022-10-16T14:47:02","slug":"add-navigation-bar-widgets-to-genesis-child-themes","status":"publish","type":"post","link":"https:\/\/purelysupp.com\/wordpress\/code-snippets\/add-navigation-bar-widgets-to-genesis-child-themes\/","title":{"rendered":"Add Navigation Bar Widgets to Genesis Child Themes"},"content":{"rendered":"\n<p>How to add Primary and Secondary Navigation Widgets to Genesis Navigation Bars.<\/p>\n\n\n\n<p>Add the following code to your WordPress theme&#8217;s function.php file, or a functionality plugin to add Primary and Secondary Navigation Widgets to Genesis.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* Custom Nav right hand side extra *\/\nadd_filter( 'genesis_nav_items', 'social_follow_icons', 10, 3 );\nadd_filter( 'wp_nav_menu_items', 'social_follow_icons', 10, 3 );\nfunction social_follow_icons($menu, $args) {\n $args = (array)$args;\n if ( 'primary' !== $args&#91;'theme_location'] )\n return $menu;\n ob_start();\n dynamic_sidebar('Social Icons');\n $social = ob_get_clean();\n return $social . $menu;\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* Custom Nav right hand side extra *\/\nadd_filter( 'genesis_nav_items', 'google_search', 10, 2);\nadd_filter( 'wp_nav_menu_items', 'google_search', 10, 2);\nfunction google_search($menu, $args) {\n    $args = (array)$args;\n    if ( 'secondary' !== $args&#91;'theme_location'] )\n    return $menu;\n    ob_start();\n    dynamic_sidebar('Google Search');\n    $social = ob_get_clean();\n    return $social . $menu;\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>genesis_register_sidebar( array(\n\t'id'\t\t=&gt; 'google-search',\n\t'name'\t\t=&gt; __( 'Google Search', 'marketing' ),\n\t'description'\t=&gt; __( 'Primary Navigation Search Box.', 'marketing' ),\n) );\ngenesis_register_sidebar( array(\n\t'id'\t\t=&gt; 'Social-Icons',\n\t'name'\t\t=&gt; __( 'Social Icons', 'marketing' ),\n\t'description'\t=&gt; __( 'Secondary Navigation Social Icons.', 'marketing' ),\n) );<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>How to add Primary and Secondary Navigation Widgets to Genesis Navigation Bars. Add the following code to your WordPress theme&#8217;s function.php file, or a functionality plugin to add Primary and Secondary Navigation Widgets to Genesis.<\/p>\n","protected":false},"author":1,"featured_media":10674,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","iawp_total_views":6,"wds_primary_category":56,"footnotes":""},"categories":[56],"tags":[110,228,64,83,123],"class_list":{"0":"post-3576","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-code-snippets","8":"tag-code","9":"tag-genesis-child-theme","10":"tag-genesis-framework","11":"tag-layout","12":"tag-navigation-menus","13":"entry"},"featured_image_src":"https:\/\/purelysupp.com\/wordpress\/wp-content\/uploads\/sites\/2\/2022\/09\/Genesis-Code-Snippets-600x400.jpg","featured_image_src_square":"https:\/\/purelysupp.com\/wordpress\/wp-content\/uploads\/sites\/2\/2022\/09\/Genesis-Code-Snippets-600x515.jpg","author_info":{"display_name":"Jack Alltrade","author_link":"https:\/\/purelysupp.com\/wordpress\/author\/jacka11trade\/"},"_links":{"self":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/3576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/comments?post=3576"}],"version-history":[{"count":3,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/3576\/revisions"}],"predecessor-version":[{"id":10707,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/3576\/revisions\/10707"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/media\/10674"}],"wp:attachment":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/media?parent=3576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/categories?post=3576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/tags?post=3576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}