This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Layout Builder element suggestion: Featured Image

  • Creator
    Topic
  • #20179
    Israel Curtis
    Participant

    Just noticed as I started putting together a custom layout for a page (right there on the page editor! so handy!) that while I can add the current page content, there is no element that references the assigned “featured” image for the page. The “image” element could work, but it’s best for my client to use the featured image metabox that they’re used to. Also, the layout can’t be used for multiple scenarios if I have to specify a fixed image. By adding a featured image element, the custom layout could be easily be used to display page/post content, headline, and images without any special input for the user.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #20187
    Jason Bobich
    Keymaster

    Yeah, makes sense. I’ll look into it.

    #20407
    Israel Curtis
    Participant

    Thanks for including the new “Current Featured Image” element!

    Of course, I’m trying to make use of these layouts outside of just pages, and this new element doesn’t seem to work for anything else, even with the Layouts to Posts plugin (and my new global post type applications). Could you include support for featured images no matter the post type?

    #20408
    Israel Curtis
    Participant

    actually, I just realized it’s not working for pages either (i was inserting the featured image another way). Am I missing something? Doesn’t matter what crop size I pick (even “full”), there simply is never a featured image displayed on pages or custom post types, even when the post editor clearly shows a featured image has been assigned…

    #20421
    Jason Bobich
    Keymaster

    Yeah, apologies for the confusion. This will work in Jump Start v2.0-beta3+.

    #20431
    Jason Bobich
    Keymaster

    Could you include support for featured images no matter the post type?

    Sorry, just saw this… lol, if I understand you correctly, see how this slippery slope begins? You allow all post types to use custom layouts, then well, it doesn’t make sense that this featured element won’t work across all of them. This is one of about 20 things you could find if you looked around. This is what I was talking about yesterday.

    I don’t think I’ll be adding default featured image options across all post types because I don’t know what people are going to be using custom post types for. Not everyone uses them in the way I think you’re using them.

    For example, someone may create a “Video” post type where they want the user to only see an input for a Video title and URL. I don’t want there to be a random “Post Options” box added to this interface the developer has to figure out how to dig out of there.

    But if you want to add that “Post Options” meta box across all post types and allows for selecting featured image options, you can do it like this:

    function my_post_meta($setup) {
    
        $setup['config']['page'][] = 'post_type_1';
        $setup['config']['page'][] = 'post_type_2';
        $setup['config']['page'][] = 'post_type_3';
    
        return $setup;
    }
    add_filter('themeblvd_post_meta', 'my_post_meta');

    All meta boxes the theme adds are controlled in this way with filters. See /framework/includes/meta.php.

    #20432
    Israel Curtis
    Participant

    I never suggested a post editor meta box. I’m handling the setting of the featured image myself, precisely because I do want the control over what shows on a custom post type editor screen. I’m only speaking about the new layout builder element “current featured item”. I had assumed (before i knew about beta 3) that you weren’t supporting the featured item from all post types, because it wasn’t showing.

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