Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #82416
    venumurki
    Member

    Hi there,

    I have two things to ask.

    1) Is it possible to combine featured content and latest-posts together into one section. I would like to display featured content in the left half and latest posts(3) on the right half.

    2) On the latest posts dipslay it says Posten on date by author. I only want to display the date.

    any help is appreciated.

    thanks

    #82417
    venumurki
    Member

    also for search bar on the right had top corner…instead of the search box popping up after clicking the magnifying glass symbol is it possible to just display the search box???

    #82433
    Mahesh
    Participant

    Hi @venumurki,

    1. For your first issue i.e. combine featured content and latest-posts together into one section, this is beyond the theme scope, you have to hire a customizer.

    2. The second one, hiding Posted On in latest post, create a child theme ( You can find the details on how to create a child theme HERE ). Then in child theme’s function.php add the following codes. This will hide the Posted On from post in home page only.

    if ( ! function_exists( 'adventurous_header_meta' ) ) :
    
    function adventurous_header_meta() {
    
    	$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>',
    		esc_url( get_permalink() ),
    		esc_attr( get_the_time() ),
    		esc_attr( get_the_date( 'c' ) ),
    		esc_html( get_the_date() )
    	);
    
    	$author = sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
    		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    		esc_attr( sprintf( __( 'View all posts by %s', 'adventurous' ), get_the_author() ) ),
    		get_the_author()
    	);
    
    	// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
    	//
    	if ( is_home() && ! is_paged() ) {
            $utility_text = __( '<span class="on-date">%1$s</span><span class="by-author"> by %2$s</span>', 'adventurous' );
        }
        else{
        	$utility_text = __( '<span class="on-date">Posted on %1$s</span><span class="by-author"> by %2$s</span>', 'adventurous' );
        }
    
    	printf(
    		$utility_text,
    		$date,
    		$author
    	);
    }
    endif;

    3. For displaying search box instead of magnifying glass, please add the following CSS in “Dashboard=> Appearance=> Theme Options=> Custom CSS” box:
    Note: This will only place search box in desktop view as it may cause design issue in responsive design. So the mobile view will be same as before.

    @media screen and (min-width: 981px){
        #header-right .header-search-wrap {
            display: block;
            position: static;
            padding: 0;
            border: none;
            opacity: 1 !important;
        }
        #header-search {
            display: none;
        }
        #header-right #header-search-widget{
            width: 272px;
        }
    }

    Regards,
    Mahesh

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Latest posts section’ is closed to new replies.