0

The theme I have been developing for ThemeForest is a one page WordPress personal portfolio theme. There is no widget in the main page design which is the only showcase page of this one page theme and I didn’t set any widget in that page.

But I register a sidebar in footer for other pages like index.php, page.php, single.php, archive.php, search.php etc.

  1. Is it ok not to set widget in the main page?
  2. Is it allowed to register widget in the thememode (not as a plugin)?
5
  • So you have a widget area, but in the main demo page you didn't register any widgets? And what is "thememode"? Commented Mar 22, 2017 at 16:12
  • I have registered a widget area in footer. But I didn't active that widget in my main page as the disign doesn't support any widgetized area there.Thememode means that I registered the widget in functions.php in the theme. Commented Mar 22, 2017 at 16:34
  • If the design doesn't support a widgetized area, why did you register a widget area? Commented Mar 22, 2017 at 16:42
  • Actually I have been creating this theme for ThemeForest submission. I didn't know whether ThemeForest allows theme without widget or not. Commented Mar 22, 2017 at 16:52
  • I see. This question will be best answered in the Envato forums, but as far as I know it is entirely up to you to decide whether to have a widget area or not. Commented Mar 22, 2017 at 17:14

1 Answer 1

0
  1. Q. -> you can to set widget in main page, only need to create specify widget

  2. Q. ->

    function register_my_widget(){
    register_sidebar( array(
        'name'          => esc_html__('Sidebar', 'youthemename'),
        'id'            => 'widget-1',
        'description'   => esc_html__('My first Widget', 'youthemename'),
        'before_widget' => '<div class="widget %2$s">',
        'after_widget'  => '</div>',
        'before_title'  => '<h4 class="widget-wtitle">',
        'after_title'   => '</h4>'
    ) );
    }
    add_action( 'widgets_init', 'register_my_widget' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.