Support » Theme: Blogsonry » Love it!

  • A great addition to a great theme! however, I don’t know why I couldn’t get image attachments to show descriptions?, I had to add a function and change the code in image.php in the parent theme to do it!

    In case anyone else has the same issue:

    in functions.php for blogsonry theme

    function wp_get_attachment( $attachment_id ) {
    
    	$attachment = get_post( $attachment_id );
    	return array(
    		'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ),
    		'caption' => $attachment->post_excerpt,
    		'description' => $attachment->post_content,
    		'href' => get_permalink( $attachment->ID ),
    		'src' => $attachment->guid,
    		'title' => $attachment->post_title
    	);
    }

    In image.php for twentythirteen parent theme

    <div class="entry-description">
    
    <?php  $attachment_meta = wp_get_attachment();
    echo $attachment_meta['description'];?>
    
    							<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
    
    </div>

    If you need to do this, be sure to add image.php from twentythirteen to the blogsory child theme folder! Also, do so at your own risk!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author mrwweb

    (@mrwweb)

    @deepbevel,

    Thanks for the review. A few notes:

    1. I just tested Twenty Thirteen (not Blogsonry) and it doesn’t show the description on attachment pages, so Blogsonry doesn’t either.
    2. As best I can tell Twenty Thirteen should show the description but there’s actually a pretty egregious bug preventing it from doing so. I’ll file a report shortly and link that here as well.
    3. One of the downsides of a child theme is that you can’t make a child theme of it (“grandchild theme”?). That said, please be careful about putting code in the Blogsonry functions.php file, and even more careful about recommending that others do it. Should Blogsonry update, those changes would be lost.

    If there was any other reason for the 4- rather than 5-star review, please let me know! I’m always game for constructive feedback. (And if this changes your mind, maybe you can update your rating 😉

    Theme Author mrwweb

    (@mrwweb)

    Thread Starter deepbevel

    (@deepbevel)

    Yes I saw the description code in the attachment template for the parent and so knew something wasn’t working right.
    perhaps my 4 stars was a bit harsh. It’s because my layout absolutely depends on image descriptions.
    I ran into another issue later where Masonry didn’t appear to be working, every other row only had one post.
    I’ve since started using Fukasawa theme because I’m familiar with it and knew It would work for my purpose. However I’m setting up another site with Blogsonry and don’t need the image descriptions so no worries. Also masonry works fine on that site.

    And finally, thanks for the advice. I actually tried an experiment where I created my own child theme and used Blogsonry files, then added more template files which I had modified. It seemed to be working but maybe that’s why I had the Masonry issue!

    Theme Author mrwweb

    (@mrwweb)

    Glad I could help!

    I think you may be right that “forking” blogsonry could have messed up some things. For various reasons the masonry layout is a little fragile. That said, if you can ever get the problem to appear when you’re actually using Blogsonry on its own, please let me know so I can try to diagnose the problem.

    Thread Starter deepbevel

    (@deepbevel)

    Here’s my child theme on the other site I mentioned, but it’s working fine here.
    http://www.foursticks.net/themetester/

    However, this child theme only includes the Blogsonry files with a few mods. I didn’t add any additional templates.

    And yes, after I did this it occurred to me that I still have to update Blogsonry, then adjust my child theme.. so it’s rather pointless!

    I may reactivate Blogsonry for the site where I was having the Masonry issue and give you a shout then. Thanks!

    Theme Author mrwweb

    (@mrwweb)

    It’s hard to diagnose something like this blind (and why are we still in a review thread 😜), but I have a guess. If you added templates, the masonry script may not be getting loaded. For performance, the theme only loads Masonry and the theme JS on the blog (is_home()) or archive pages (is_archive(), is_post_type_archive()). If your templates didn’t return true for any of those conditionals, there’s no script to work its magic. It also requires the masonry body_class. Hope that helps.

    Thread Starter deepbevel

    (@deepbevel)

    no worries my main issue is resolved until Twenty Thirteen is updated. If I need help with my experiment I can start another thread. Thanks again for the great theme and support!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Love it!’ is closed to new replies.