Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter maaving

    (@maaving)

    .theme-default .nivoSlider {
    width:100%!important;
    height:100%!important;
    overflow: hidden;
    }

    ! Important; With, I forced the size and solved it.

    Thread Starter maaving

    (@maaving)

    Nice to meet you!
    I solved this separately by e-mail, Thank you 🙂

    If there is anything else there is still unresolved on other topics, but I hope that you can see it by professional.

    Thank you very much.
    【WP Nivo Slider】
    Topic name: Specify image size in%
    URL: https: //ww.wp.xz.cn/support/topic/specify-image-size-in/

    I would be pleased if you could tell me something you need.

    Thread Starter maaving

    (@maaving)

    For the sake of completeness I will write the contents described in the current functions.php.

    
    <?php
    add_action( 'wp_enqueue_scripts', 'child_enqueue_styles',99);
    function child_enqueue_styles() {
        $parent_style = 'parent-style';
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ) );
    }
    if ( get_stylesheet() !== get_template() ) {
        add_filter( 'pre_update_option_theme_mods_' . get_stylesheet(), function ( $value, $old_value ) {
             update_option( 'theme_mods_' . get_template(), $value );
             return $old_value; // prevent update to child theme mods
        }, 10, 2 );
        add_filter( 'pre_option_theme_mods_' . get_stylesheet(), function ( $default ) {
            return get_option( 'theme_mods_' . get_template(), $default );
        } );
    }
    
    function child_categories_excerpt_shortcode( $atts ) {
    	global $post;
    
    	$atts = shortcode_atts( array(
    		'parent' => 0,
    		'count' => 5,
    	), $atts, 'child_categories_excerpt' );
    
    	$output = '';
    
    	$output .= '<div class="child-categories-excerpt">';
    	$categories = get_categories( array(
    		'orderby' => 'name',
    		'parent' => $atts['parent'],
    	) );
    	foreach ( $categories as $category ) {
    
    		// netshopping,webtool,wbsite,fashion
    		$output .= '<h3><a>term_id ) . '">' . $category->name . '</a></h3>' . "\n";
    
    		$myposts = get_posts( array(
    			'posts_per_page' => $atts['count'],
    			'category' => $category->term_id,
    		) );
    		foreach ( $myposts as $post ) {
    			setup_postdata( $post );
    
    			$output .= '<div class="child-categories-excerpt-post-container">';
    			$output .= '<h4><a href="' . get_the_permalink() . '">' . get_the_title() . '</a><h4>';
    			$output .= get_the_excerpt();
    			$output .= '</div>' . "\n";
    		}
    		wp_reset_postdata();
    	}
    	$output .= '</div>' . "\n";
    
    	return $output;
    }
    
    add_shortcode( 'child_categories_excerpt', 'child_categories_excerpt_shortcode' );
    
    • This reply was modified 9 years, 1 month ago by maaving.
    Thread Starter maaving

    (@maaving)

    I tried this morning and it went well!
    I like being able to customize to like it and I’m very satisfied.
    Thank you very much.
    I will enjoy “Amadeus” from now on 🙂

    Thread Starter maaving

    (@maaving)

    Thank you!
    I will try it immediately.

    I’d appreciate it if you can advise if you get stuck again.
    Thanks! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)