8px

Thoughts, stories and ideas.

Wordpress functions.php: czystka w js oraz css

Wordpress functions.php: czystka w js oraz css

//czystka w js function sw_deregister_javascript() {     wp_deregister_script( 'ngg_script' );     wp_deregister_script( 'shutter' );     wp_deregister_script( 'blog-post-calendar-widget' );     wp_deregister_script( 'jquery-cycle' ); } add_action( 'wp_print_scripts', 'sw_deregister_javascript', 100 ); //czystka w css function sw_deregister_styles() {     wp_deregister_style( 'contact-form-7' );     wp_deregister_style( 'posts-from-category-widget-stylesheet' );     wp_deregister_
Wordpress functions.php: Rozszerzenie nawigacji

Wordpress functions.php: Rozszerzenie nawigacji

class sw_walker extends Walker_Nav_Menu {     function start_el(&$output, $item, $depth, $args) {         global $wp_query;         $indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';         $class_names = $value = '';         $classes = empty( $item->classes ) ? array() : (array) $item->classes;         $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes
1 min read
Wordpress functions.php: sidebar

Wordpress functions.php: sidebar

function register_sidebars() {   $sidebars = array('Sidebar', 'Footer','YouTube', 'Wydarzenia');   foreach($sidebars as $sidebar) {     register_sidebar(       array(         'id'            => 'blabla-' . sanitize_title($sidebar),         'name'          => __($sidebar, 'sw'),         'description'   => __($sidebar, 'sw'),         'before_widget' => '
',         'after_widget'  => '
',         'before_title'  => '

',         'after_title'   => '

'