Thứ Tư, 28 tháng 12, 2022

Wordpress Directory plugin select 2 issue Iphone

 Detail: Wordress use plugin Directorist - Business Directory Plugin
Safari iphone select2 can not select
Step: input click -> select popup view above, this issue popup view in range click too : this mean selected and hide popup


Solution: popup above move top out range click by CSS

/*mobileSelectIssue*/
body .select2-container--open .select2-dropdown--above{
    top:-2px;
}


 

Thứ Tư, 7 tháng 12, 2022

Wordpress add widget position

 1. Load position: position may be header, footer, main view

        <?php
            if (is_active_sidebar('logobox')){
                dynamic_sidebar('logobox');
            }
            ?>

2. Init functions.php

/*TopBox*/
function CustomLogoBox()
{
    register_sidebar(array(
        'id' => 'logobox',
        'name' => 'Logo Box',
        'description' => 'Logo box text',
        'before_widget' => '<div class="logobox">',
        'after_widget' => '</div>',
        'before_title' => '<h3 class="logo-widget-title">',
        'after_title' => '</h3>'
    ));

}
add_action( 'widgets_init', 'CustomLogoBox' );

3. Wordpress admin add widget