?? WordPress Tutorial ????? WordPress ??? CSS ??? ???? ??? ???????. ??? ??? ????? ??? ?? ????!
????? ??? ???? ????, ??? ?? ???? ???? ??? ????? ??? ?? ???? ?? ??? ??? ????? ???, ?? ??? ?? ?? ID? ? ? ????. ?? ?? ??? ?? ??? ?????.
<section id="search-2" class="widget widget_search">
??? search-2? ? ??? ID???. #search-2? ???? ???? ??? ? ????. ??? ??? ? ???? ???. ???? ?? ??????.
?? ??? ???? ?? ??? CSS ??? ???? ??? ? ????. ?? ?? ?? ???? function.php? ??? ???? ???. ??? ??? ????.
Code 1
CSS? ?????. ??? ??
function zm_widget_form_extend( $instance, $widget ) { if ( !isset($instance['classes']) ) $instance['classes'] = null; $row = "<p>\n"; $row .= "\t<label for='widget-{$widget->id_base}-{$widget->number}-classes'>CSS類</label>\n"; $row .= "\t<input type='text' name='widget-{$widget->id_base}[{$widget->number}][classes]' id='widget-{$widget->id_base}-{$widget->number}-classes' class='widefat' value='{$instance['classes']}'/>\n"; $row .= "</p>\n"; echo $row; return $instance; } add_filter('widget_form_callback', 'zm_widget_form_extend', 10, 2); function zm_widget_update( $instance, $new_instance ) { $instance['classes'] = $new_instance['classes']; return $instance; } add_filter( 'widget_update_callback', 'zm_widget_update', 10, 2 ); function zm_dynamic_sidebar_params( $params ) { global $wp_registered_widgets; $widget_id = $params[0]['widget_id']; $widget_obj = $wp_registered_widgets[$widget_id]; $widget_opt = get_option($widget_obj['callback'][0]->option_name); $widget_num = $widget_obj['params'][0]['number']; if ( isset($widget_opt[$widget_num]['classes']) && !empty($widget_opt[$widget_num]['classes']) ) $params[0]['before_widget'] = preg_replace( '/class="/', "class=\"{$widget_opt[$widget_num]['classes']} ", $params[0]['before_widget'], 1 ); return $params; } add_filter( 'dynamic_sidebar_params', 'zm_dynamic_sidebar_params' );
?? 2
ID ?? ? CSS ??? ???? ??
function zm_widget_form_extend( $instance, $widget ) { if ( !isset( $instance['classes'] ) ) $instance['classes'] = null; if ( !isset( $instance['custom_id'] ) ) $instance['custom_id'] = null; $class_prefix = 'widget-'; $myclass = array( 'default' => '默認(rèn)', 'blue' => '藍(lán)色', 'yellow' => '黃色', 'black' => '黑色', ); $row = "<p>\n"; $row .= "\t<label for='widget-{$widget->id_base}-{$widget->number}-custom_id'>添加ID</label>\n"; $row .= "\t<input type='text' name='widget-{$widget->id_base}[{$widget->number}][custom_id]' id='widget-{$widget->id_base}-{$widget->number}-custom_id' class='widefat' value='{$instance['custom_id']}' />\n"; $row .= "\t<label for='widget-{$widget->id_base}-{$widget->number}-classes'>CSS類</label>\n"; $row .= "\t<select name='widget-{$widget->id_base}[{$widget->number}][classes]' id='widget-{$widget->id_base}-{$widget->number}-classes' class='widefat'>"; foreach( $myclass as $key => $class ) { $selected = null; if( $class_prefix.$key == $instance['classes'] ) $selected = 'selected = "selected"'; $row .= "\t<option value='$class_prefix$key' $selected>$class</value>\n"; } $row .= "</select>\n"; echo $row; return $instance; } add_filter('widget_form_callback', 'zm_widget_form_extend', 10, 2); function zm_widget_update( $instance, $new_instance ) { $instance['classes'] = $new_instance['classes']; $instance['custom_id'] = $new_instance['custom_id']; return $instance; } add_filter( 'widget_update_callback', 'zm_widget_update', 10, 2 ); function zm_dynamic_sidebar_params( $params ) { global $wp_registered_widgets; $widget_id = $params[0]['widget_id']; $widget_obj = $wp_registered_widgets[$widget_id]; $widget_opt = get_option($widget_obj['callback'][0]->option_name); $widget_num = $widget_obj['params'][0]['number']; if ( isset( $widget_opt[$widget_num]['classes'] ) && !empty( $widget_opt[$widget_num]['classes'] ) ) $params[0]['before_widget'] = preg_replace( '/class="/', "class=\"{$widget_opt[$widget_num]['classes']} ", $params[0]['before_widget'], 1 ); if ( isset($widget_opt[$widget_num]['custom_id']) && !empty($widget_opt[$widget_num]['custom_id']) ) $params[0]['before_widget'] = preg_replace( '/id=".*?"/', "id=\"{$widget_opt[$widget_num]['custom_id']}\"", $params[0]['before_widget'], 1 ); return $params; } add_filter( 'dynamic_sidebar_params', 'zm_dynamic_sidebar_params' );
CSS ??? ??? ??? ?? ???? ?? ???? ? ??? ? ????.
??: ??? ??? ?? ?? ?? ?? ????? ??? ?????.
? ??? WordPress ??? CSS ??? ??? ???? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

WordPress ?? ??? ???? 4 ?? ??? ????. ?? ?? ??, ???? ?? (? : Post Type Order, WP Post List, Boxy Sitture), ?? ?? (Functions.php ??? ?? ??) ?? WordPress ??????? ?? ??????.

? ?? ???? ??? ?? ?????. ???? ??? ?? ?? ??? ?? ? ????. ? ?? ????? ???? ??? ?? ????? ???? ?? ? ???? ??? ??? ???? ???? ??? ??? ??? ????. ??? ? ??? ?? ??? ?? ???? ?? ???? ?? ???? ??? ??? ????. ??? ??? ??? ??? ?? ??? ???? ????? ?? ??? ??? ??? ?? ? ??? ?? ?? ????. ? ????? ??? ??? ???? ?? ??? ? ?? ????. ??? ??? ??? ???? ????? ???? ???? ??? ??? ??? ???? ? ?? ????? ?????? ? ??????. ? ??? ???? ???? ???? ????.

WordPress ?? ?? ?? ???? ?? ??? ?????. ?? ????? ?? ??? ????. ?? ??? ?? ?? ?? ???? ??? ?? ???. ?? ??? ????? ??????. ?? ?? ????? ???? ?? ?? ??? ???????.

WordPress ???? ???? ? ???? ????? ??? ?? ?????. ??? ??? ??? ?? ??? ??????. ??? ??? ??????. WordPress ??? ??? ??????. ??? ??????. ???? ??? ??????. ????? ??????. ? ???? ??? ??????. ??? ? ???? ??????.

? ???? Yandex Webmaster ??? ?? ??????? Google Search Console, Bing ? Yandex? ?? ? ??? ??? ???? ? ???? ????? ???? ?????? Robots.txt? ???? ? ??? ?? ?? ?? ??? ? ????. ? ????? WordPress ? ???? Yandex ? ??? ??? ???? ?? ?? ???? ?????? ??? ?????. Yandex? ?????? Yandex? Google ? Bing? ??? ???? ??? ? ???? ?? ?????. Yandex?? ?? ? ? ????

WordPress ? ????? ??? ???? ??? ?? ????? ??? ??? ????? ?? ??? ???? ? ??? ?????. ? ??? ???? ??? ? ?? ???? ?? ??? ??? ???? ? ????. ? Ultimate Guide??? ????? WordPressCookies? ??, ?? ? ???? ??? ?? ??????. ?? : ??? ?? ???????. HTML, CSS, WordPress ? ??? ? PHP? ???????. ??? ?????? ??? ???? ? ???? ?? ? ? ?? ? ?????.

WordPress?? ??? ???? ? ???? ???? ?? ??? ???? ?? ??? ??? ?? ??? ??? ??????. ???? ?? ????? Google ?? ?? Apple ID ??? ?????. ??? ???? ? ??? ???, ?? ??, ???? ?? ? ?? ??? ?????.

WordPress?? HTTP ??? ??? ??? ???????? ? ??? WordPress?? ???? ?? ? ?? ?? ??? ? ????. ????? ?? ? WordPress ??? ?????? ???? ??? ?? ?? ??? CMS? ??? ? ? ?????. ? ????? WordPress?? HTTP ??? ??? ??? ?? ???? ??? ?????. WordPress ??? ??? ?? HTTP ??? ??? ?????? WordPress ??? ? ??? ???? ??? WO? ?????? ? ?
