[Support request] Featured Image and post title disappeared using sections

Home Forums Support Featured Image and post title disappeared using sections

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #310270
    Karl

    I’m trying to use sections and noticed that my featured image and heading disappeared. Not sure whats going on.

    The post started as a normal default post. Later I copied the content and pasted it in different sections. When editing the post it does say “currently using your featured image” so that sounds right to me 🙂 Cant figure it out.

    Any ideas? Thanks.

    #310277
    Tom
    Lead Developer
    Lead Developer

    Using Sections removes everything else from your page – this is to give you a consistent look throughout the sections of your page.

    You can still use the Page Header add-on, but those other elements will disappear in order to give you more exact control over the look of each section.

    #310414
    Karl

    Thanks for replying!

    I created another section and added the image that I used as featured image. Now it is showing at the top like normal. But what can I do to show the post title under the image like I had before using sections?

    I wanted to use sections so that my content could have different widths. The layout I want is:
    Main post image: max-width:1087px;
    Title: max-width:900px;
    Introduction: max-width:900px;
    Rest of content: max-width:660px;

    I use the custom class to achieve this and add my css in simple css on the post. Is that a good way of doing it? Can I also save that setup as a template?

    Only thing missing now is getting back my post title 🙂

    Thanks for all the awesome help btw!

    #310582
    Tom
    Lead Developer
    Lead Developer

    I suppose you could do something like this..

    add_action( 'generate_before_main_content','tu_sections_title' );
    function tu_sections_title() {
        $use_sections = get_post_meta( get_the_ID(), '_generate_use_sections', TRUE);
        if ( isset( $use_sections['use_sections'] ) && 'true' == $use_sections['use_sections'] ) {
            the_title( '<h1 class="entry-title" itemprop="headline">', '</h1>' );
        }
    }
    #310667
    Karl

    Thanks man! I’ll give it a try. But I might be overthinking this. I could just add classes directly in the text editor and set the width 🙂

    #310758
    Tom
    Lead Developer
    Lead Developer

    That would definitely be the easier solution – you’d have more control over the style as well 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.