This topic has 6 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #166656
     Cairy
    Participant

    Hi,

     

    is it possble to set the feautured image full width with a sidebar in the post pages?

    It should look like the buddypress pages with a sidebar and full width profile header.

     

    Regards

    #166696
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #166954
     Radu
    Moderator

    Hi

    Just use this function and this will be added automatically immediately after the header ends in full-width mode

    Example

    COPY CODE
    
    function blog_single_full_image_above_post()
    {
    	if (is_single()) {
    		if (has_post_thumbnail()) {
    			echo '<div class="fullwidth-image-before-content">';
    			echo the_post_thumbnail('full');
    			echo '</div>';
    		}
    	}
    }
    

    The function needs to be pasted in wp-content/themes/kleo-child/functions.php

    NOTE: Child theme needs to be installed and activated.

    Also, i implemented this in the theme and in next theme version this option will be found under wp-admin -> theme options -> blog.

    That’s all

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #166963
     Cairy
    Participant

    Hi Radu,
    thank you but the code isnt working.
    Regards

    #167061
     Radu
    Moderator

    Hi,

    Replace the code with this one, sorry I’ve missed the action hook, sorry !

    COPY CODE
    
    function blog_single_full_image_above_post()
    {
    	if (is_single()) {
    		if (has_post_thumbnail()) {
    			echo '<div class="fullwidth-image-before-content">';
    			echo the_post_thumbnail('full');
    			echo '</div>';
    		}
    	}
    }
    add_action('kleo_before_main', 'blog_single_full_image_above_post');
    

    Let me know

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #170288
     Cairy
    Participant

    Hi Radu,
    thanks again and sry for the late reply.
    Code works but the image doesnt fit or scale. Also the image is shown twice. One time as full width and second as the old featured image.

    The image should be full width but the title bar should be above like before. Under the image should the sidebar begin. Like the buddypress full widht profile.

    Regards

    #170705
     Radu
    Moderator

    Hi,

    Can you provide an example how the image doesn’t fit? live URL or screenshot with some additional notes

    You can de-activate the featured image in content from wp-admin -> theme options -> Display media on post page -> OFF

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?