Change this code
add_action( 'after_setup_theme', 'right_sidebar_widget' );
with
add_action( 'widgets_init', 'right_sidebar_widget' );
Related Posts:
- Custom Sidebar only on single post
- Register_Sidebar overwriting itself and doesn’t exist in global $wp_registered_sidebars;
- Widget is displayed in two places
- Add the title of a widget as an ID – for anchor links
- Can the new 4.8v text widget visual editor be removed?
- How to influence the information displayed on widget inside wp-admin
- How to add css class to cloud tag anchors?
- How can I get $id variable in widget’s form function?
- Using add_filter() in Widgets
- Show/hide Widgets in Dashboard Based on Current Advanced Custom Fields Option
- remove the wrapping of text widget or
- remove from text-widget
- Programmatically Add Font-Awesome Icons to Category Widget
- Authors details such as social media links, emails etc → Is this Meta or something else?
- Dynamically Register Sidebars For Each Top Level Page
- Customising widget titles/headings in WP 5.8
- Widgets Section not displaying in theme customizer
- Displaying Widgets
- What is the most efficient method for loading widgets in functions.php
- Ajaxing function in widget class
- Increment price for Woocommerce Minicart [closed]
- Missing argument 2 for a custom function widgets_init
- Add before_content and after_content to register_sidebar
- Adding widget to dashboard with wp_dashboard_setup not working
- How to insert custom widget in custom sidebar in theme activation?
- Right way to update widget on dynamic new input field
- Passing values from a widget to a function within a plugin
- Override widget in function WordPress
- Best practices regarding the creation of custom widgets?
- How can I make a widget shortcode to control all the widgets?
- Replace a menu with widget or a custom template file programmatically
- Custom taxonomy widget in admin area
- Dashboard widget custom positioning?
- How do you Permanently Delete Sidebars
- WordPress Shortcode function display outside of widget
- Get rid of the widget Item Class=”widget-item”
- Can’t Write Custom Widget Code In One ECHO
- Why is it so hard to add a class to the tag in the sidebar widget?
- The correct way to add a JavaScript in the functions.php [closed]
- Passing user enetered value in widget: number of words, for example
- Create a Woocommerce product widget with category filter
- Add element to widgetpage
- “All posts” in the category widget
- How to echo Widget Title in Custom Frontend-Template Box
- New checkbox in custom widget isn’t saving data
- the_widget() inside functions.php
- How to conditionally add a widget via a hook in functions.php
- Creating a custom wordpress widget and stopping js from running twice(once in active widget once in widget selector)?
- How Do I include/Import a Custom Widget from the Parent theme into My Child Theme?
- Add a custom function to widget code
- Include widget file in functions.php of child theme
- Displaying registered sidebar after post content
- Enable accessibility mode in widget as default
- Trying to change widgets h-tags
- Extend WordPress Audio Widget to accept HLS (.m3u8) URLs
- my wordpress doesn’t save items to customized widget area
- Copying a widget class to functions.php results on a blank page
- How to add widget in main menu
- Adding A New Widget to WordPress Disables the Existing Widgets
- wp_nav_walker that interacts with widgets to setup mega menu
- Expanding a function to call a plugin or show a link
- How to programmatically GET (to know) which Sidebar (or) which Menu is being used on Different Pages?
- WordPress Javascript Widget jQuery Dependency Issue
- Register a widget area when a theme option has been saved?
- Give a function a unique ID
- Swap WordPress “Widget Area” based on Page Template
- remove empty paragraphs from the_content?
- Display custom comments field for first level only
- Child theme – copied some files from parent to child website still uses parent files
- Using locate-template & shortcodes doesn’t appear to work
- How to make unique add_filter to the_content of specific page template files – so each template gets its own addition
- How to test for Super Admin
- Replace menu links with # and add name to its li
- Retrieve tags data in post body
- Change template on the fly based on post parent selection
- Remove the product category module block from the Woocommerce product page
- Setting youtube size in functions.php
- Conditional functions.php on page template
- Problem with comments_number()
- Functions when woocommerce isn’t installed
- While loop with an exception after a count is reached
- Return child theme url
- Do we need to change our child function.php to require/include child dir files when we add an over-riding file.php into the child theme
- Insert a field with PREG_REPLACE – strange behaviour
- Difference between get_userdata() and get_currentuserinfo()
- Astra theme – cannot set short product description under the product title (product name)
- Is posible to redirect a few URL?
- Run function with schedule is not working correctly
- I have defined 2 text strings, how do I use them in my posts?
- Create New User Custom Field not Saving
- Keep Admin Logged In For a Year
- WordPress Ajaxifying not working properly
- Using a variable in name of dynamically-called helper function
- custom COOKIE on custom page
- List all post title in category using functions.php
- Remove Captions from Custom Gallery function.php
- Optimizing multiple WP_querys into one call?
- How do I get my nav menu to show sub pages?
- Gallery Shortcode Function Help
- How do I add e-mail subscription functionality