Static Header + More text in slider Image

Hi,

I am using the Dazzling theme for my site http://abrushwithgrace.com/

There are two problems I’m facing and need help with.

  1. I wanted to make the header static and added the following extra lines under “.navbar.navbar-default”

position: fixed;
z-index: 99;
width: 100%;

The header works properly on the homepage but when I open a single blog or a static page, it’s broken - a peculiar space on the top. Can you please help me troubleshoot the issue.

  1. The excerpt on the homepage “Welcome to my blog!” - I need a few more lines to be included there. It’s gets terminated currently which will not work in my case. Is there a way to add another line there?

Thank You for the help :slight_smile:

T

Managed to get the header problem solved.

The trick was adding another line in the CSS:

top:0;

Still waiting for someone to help me on the second problem. Would appreciate any support.

Thanks,
T

Hi T,

I hope you are well today and thank you for your question.

You can display more text by adding the following code in the functions.php file of your child theme. Change the 100 value in the following code to number of words you want to display.


function custom_excerpt_length($length){ 
	return 100; // Change the number of words length here.
} 

/**
 * Featured image slider
 */
function dazzling_featured_slider() {
    if ( is_front_page() && of_get_option('dazzling_slider_checkbox') == 1 ) {
      echo '<div class="flexslider">';
        echo '<ul class="slides">';

          $count = of_get_option('dazzling_slide_number');
          $slidecat = of_get_option('dazzling_slide_categories');

            if ( $count && $slidecat ) {
            $query = new WP_Query( array( 'cat' => $slidecat, 'posts_per_page' => $count ) );
            if ($query->have_posts()) :
              while ($query->have_posts()) : $query->the_post();

              echo '<li>';
                if ( has_post_thumbnail() ) { // Check if the post has a featured image assigned to it.
                  the_post_thumbnail();
                }

                echo '<div class="flex-caption">';
                  echo '<a href="'. get_permalink() .'">';
                    if ( get_the_title() != '' ) echo '<h2 class="entry-title">'. get_the_title().'</h2>';
                    if ( get_the_excerpt() != '' ){                  	
                  		add_filter('excerpt_length', 'custom_excerpt_length');
                  		echo '<div class="excerpt">' . get_the_excerpt() .'</div>';
                  		remove_filter('excerpt_length', 'custom_excerpt_length');
              		}
                  echo '</a>';
                echo '</div>';

                endwhile;
              endif;

            } else {
                echo "Slider is not properly configured";
            }

            echo '</li>';
        echo '</ul>';
      echo ' </div>';
    }
}

I have attached the sample child theme containing above changes which you can just use to achieve it.

Best Regards,
Movin