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.

Israel Curtis

Forum Replies Created

Viewing 15 replies - 16 through 30 (of 39 total)
  • Author
    Replies
  • Israel Curtis
    Participant

    So I started digging in the Layout to Posts plugin to see how you’re applying layouts locally (per post). Found this filter hook for the primary config array:

    add_filter( 'themeblvd_frontend_config', 'themeblvd_ltp_frontend_config' );

    and then the triggering of the layout builder in case a layout has been selected

    add_action( 'template_redirect', 'themeblvd_ltp_redirect' );

    So I guess what explains the current “non-global” system for applying layouts is that you’re storing the selection of a layout in the individual post meta. Thus, every post that is to be displayed with a custom layout must have the post meta included.

    $layout_name = get_post_meta( $post->ID, '_tb_custom_layout', true );

    So my plan to implement a more global usage of layouts was to copy the functionality of themeblvd_ltp_frontend_config() but instead of checking for post meta, I would provide the custom layout name manually depending on the custom post type involved (and then later I’ll build some kind of theme options UI to assign layouts for each post type).

    Now technically all I need to replace is this:

    $layout_name = get_post_meta( $post->ID, '_tb_custom_layout', true );

    and the rest of themeblvd_ltp_frontend_config() would be identical, where it grabs the id, featured, below, sidebars, etc. This would work, but I’d rather not be recreating all that very themeblvd-specific code, which might break with future updates to themeblvd framework. Maybe that could exist within the framework and I could just be filtering the retrieval of the layout name — to allow for cases other than post meta storage.

    I’m also wondering why

    add_action( 'template_redirect', 'themeblvd_ltp_redirect' );

    exists in this external “Layout to Posts” plugin — don’t you need to be checking for custom layouts normally and redirecting even without this plugin? If I’m filtering the primary config array to add a layout, I would think the framework would automatically notice the builder layout in the config and fire this redirect automatically.

    in reply to: Jump Start 2.0-beta2 fun and WooCommerce chit-chat #20391
    Israel Curtis
    Participant

    I have a memory of reading that as of beta2 that old patch wasn’t necessary already? I haven’t been using the plugin anymore — but I am still getting the standard WooCommerce warning dialog across the top:

    “Your theme does not declare WooCommerce support – if you encounter layout issues please read our integration guide or choose a WooCommerce theme :)”

    Any chance you’ll be declaring support to make WooCommerce happy before beta is over?

    Israel Curtis
    Participant

    So after trying all the crop sizes and still getting nothing, I had a realization. I’m setting up this site as a page-based CMS, and I don’t think this hook works for pages, only posts. I noticed that the custom CSS from the tutorial had a “article.single .featured-item” selector, which didn’t exist in my page source. Once I changed the CSS to this, I finally had control of the image:

    article.single .featured-item,
    article.page .featured-item {
      float: left;
      margin: 0 20px 20px 0;
      max-width: 250px;
    }

    But really I was still shrinking the full-size image via CSS. Which made me think that your filter hook was never firing for page views:

    add_filter('themeblvd_single_atts', 'my_single_atts');

    So is there another hook to provide this functionality of automatically inserting the featured image for pages too?

    I’m noticing, as I create this page-based hierarchical CMS site, that there are quite a few “gotchas” when it comes to using pages. There are many features that are tailored for Posts, but don’t work quite right when you’re using Pages (my other thread about excerpts, for example). With post grids and lists, even when you select pages as a source, the only method for indicating which pages is a list of slugs (not dynamic, and most people don’t know the slugs by heart) — when maybe an option to fetch all child pages would be more useful (and more typical for static page-based sites). Also the ordering doesn’t have an option for “menu_order”, which is very commonly used to arrange the way pages are displayed (also often with custom post types).

    For me, Pages are just another post type that live alongside my custom post types in the CMS, a familiar item for most wordpress users, and the core Posts are used for reverse-chronological blog items. So I’m wondering if maybe the old tried-and-true Pages could get a little more love in JS2.0?

    Israel Curtis
    Participant

    thanks for investigating. makes sense. Was simply trying to avoid client choosing pages for their grids and suddenly seeing “0” because they hadn’t manually set excerpts.

    Israel Curtis
    Participant

    Actually, now that I’ve manually enabled excerpts for pages and removed the “0” that was saved there (??) , I’m seeing auto-generated excerpts from the page content, so my suggestion isn’t needed. But maybe you should include something to ensure that if pages are pulled into post grids, you bypass the default “0” (since most people haven’t enabled manual excerpts for pages) and perform the same auto-generation.

    Israel Curtis
    Participant

    An even better solution for missing manual excerpts, when the user has selected to display excerpts, would be to use auto-generated excerpts based on the post content.

    Much like what’s described in the codex:

    “The manual WordPress excerpt is often confused with the automatic excerpt or with the teaser (the part of a post that appears on the front page when you use the More tag). While both are related to the manual excerpt, they are different from it.

    The relationship between the three is this: When a post has no manual excerpt and the post template uses the the_excerpt() template tag, WordPress generates an excerpt automatically by selecting the first 55 words of the post. When the post template uses the the_content() template tag, WordPress will look for the More tag and create a teaser from the content that precedes the More tag.”

    Israel Curtis
    Participant

    actually, this is an image that I just uploaded now, so I would think with beta2 installed for some time now, that size would have been generated? I’ve tried other sizes too, and nothing happens.

    I figured that’s why I’m adding “crop” — but I also tried to follow the trail and see where my additional “crop” array key would be utilized, and couldn’t find it in any of the code for displaying single posts…

    in reply to: Jumpstart 2.0 beta2 auto-embed youtube is 1200px wide #20158
    Israel Curtis
    Participant

    Also note that the “shortcode embeds” module is enabled by default on all Jetpack installations

    in reply to: Jumpstart 2.0 beta2 auto-embed youtube is 1200px wide #20157
    Israel Curtis
    Participant

    With Jetpack enabled, this is the code that gets output for youtube links:

    <p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='1200' height='705' src='http://www.youtube.com/embed/IwvHDcm49ZI?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1&wmode=transparent' frameborder='0' allowfullscreen='true'></iframe></span></p>

    And here’s what shows with the module disabled:

    <div class="themeblvd-video-wrapper">
    <div class="video-inner"><iframe width="1200" height="900" src="http://www.youtube.com/embed/IwvHDcm49ZI?feature=oembed&wmode=transparent" frameborder="0" allowfullscreen></iframe></div>
    </div>
    in reply to: Jumpstart 2.0 beta2 auto-embed youtube is 1200px wide #20156
    Israel Curtis
    Participant

    I remembered that Jetpack also included some video shortcode functionality. Now I’m not using shortcodes, just raw URL. But when the “Shortcode Embeds” module in Jetpack 3.3 is enabled, it appears to conflict with your layout. I was able to recreate by disabling Jetpack altogether or just that module. Note that the module doesn’t cause such a problem with themes other than Jumpstart.

    in reply to: Jump Start 2.0-beta2 fun and WooCommerce chit-chat #20124
    Israel Curtis
    Participant

    +1 for deep woocommerce integration! Can’t stress enough how crucial woocommerce is to all of my clients (and my own properties). I don’t use any other e-commerce platforms anymore…

    in reply to: Jump Start 2.0 Beta #19834
    Israel Curtis
    Participant

    [raises beer] Thanks!

    in reply to: Jump Start 2.0 Beta #19813
    Israel Curtis
    Participant

    No need for the demo import right away — if you can post a beta2 sooner than later, please do!

    in reply to: Jump Start 2.0 Beta #19725
    Israel Curtis
    Participant

    Any estimate on when a new beta release will be posted?

    in reply to: giving layout builder elements named anchors #8729
    Israel Curtis
    Participant

    so the DIV id’s that get generated are a little unwieldy, like “#element_59965303851a2ec5061165”, but it’s better than nothing. In the process of implementing this, however, I realized something else that is missing – the ability to group multiple elements together in a container.

    So how about this: a new layout builder “Group” element that simply wraps the member elements in a DIV, and the only parameter for the “Group” element (besides the responsive show/hide) is a field for ID name. I’m finding it rather difficult to do some kinds of CSS styling for elements I want to group visually (like backgrounds that span multiple elements, like a headline box above a content box). This way, we get grouping and custom ID’s in one shot. And if someone wanted a custom ID for just one element, they could just put one element inside a group wrapper.

    Is there a way to pull this functionality off with filters/hooks, or is it going to require a future update?

Viewing 15 replies - 16 through 30 (of 39 total)