Forum Replies Created
-
AuthorPosts
-
cosmocanuckMember
Whadya know, I just noticed this text in the Genesis parent theme CSS file, right in the intro stuff at the top:
"Copy the contents of this file to the child theme. Do not use @import, as the CSS included with Genesis might change in the future."
I did exactly that, replacing the @import line with a copy of the previous Genesis version's CSS, followed still by my own additions.
Aaaaaand.... instantly the site is fixed!
Guess I should've noticed and followed that advice!
Last question: I assume if I don't use "genesis_setup" or "genesis_create_initial_layouts" (i.e. I don't reference them in my functions.php file, and haven't done anything else at that level with my theme, just the new CSS and graphics), then I don't have anything to worry about?
Anyway, thanks so much for helping me figure this out.
Adam
cosmocanuckMemberThanks, Christoph! Super helpful! I'll have another look based on this info.
Adam
cosmocanuckMembercoralseait, thanks so much! I'm actually heading out of town today so this will all have to go on hold for a little while, but I'll delve into it once I return.
Agreed that just pasting code is something to avoid! Thanks again for your help and I'll pick this up again soon.
cosmocanuckMembercoralseait, your questions are great and highlight the fact that I can't answer them, since I'm a bit falling into the trap of using "code that someone says should work" without fully understanding it. Bad, bad idea, I know. Sometimes the coding success and the comprehension of same play a bit of leapfrog. 8^)
That said, I'm not at all sure that $thumbnail or $post_id are being set properly - and I don't actually know how to find that out! I do want to conform to best practices as I continue to develop my coding skills so any advice or helpful links in this regard would be most welcome.
cosmocanuckMemberHmm, that didn't seem to have any effect, braddalton. I will keep digging into this issue as it can't be that tricky to use a thumbnail in a query... I hope...!
cosmocanuckMemberArgh! Still running into some stuff I don't understand. First, I'm getting the word "Array" before my thumbnail image. And, though the thumbnail appears at a perfect size when I simply have it on the page, when I place the thumbnail code into a table cell, it shrinks down to a tiny size. What gives?
Here again is the page: http://adamabramsdesign.com/mailout/
And here's my new code:
// The Loop if ( $the_query->have_posts() ) { while ( $the_query->have_posts() ) { $the_query->the_post(); echo '<table><tr> <td colspan="2"> <h3><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></h3></td></tr>'; echo '<tr><td>' . $thumb_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail'); echo '<a href="' . get_permalink( $thumbnail->ID ) . '" title="' . the_title_attribute('echo=0') . '" >'; echo get_the_post_thumbnail($post_id, 'thumbnail', array('class' => 'alignleft')); echo '</a></td>'; echo '<td><p>' . get_the_excerpt() . '</p>'; echo '<p style="font-weight: bold;"><a href="' . get_the_permalink() . '">Read article</a></p>'; echo '</td></tr></table>'; } } else { // no posts found } /* Restore original Post Data */ wp_reset_postdata();
Thanks in advance....!
cosmocanuckMemberGuys, I'm sorry - there actually was no featured image set for the post! Kinda explains why nothing was being displayed.
I was fooled into thinking there was one because my blog page view (http://adamabramsdesign.com/category/blog/) includes an image which looks convincingly like a Featured Image. But it's acquiring this another way. How, I can't even determine just now (this was one of my first themes built by modifying the Genesis child theme). But that's a question for another day I guess!
Thanks for all your help.
cosmocanuckMemberThanks everyone for the quick response! I guess I should have included the entire query from the get-go. It's below.
I guess I'm running into trouble by assuming that since things like get_the_permalink() and get_the_excerpt() are working "out of the box" in my query, that referencing the thumbnail would work the same way. But I don't seem to have a handle on proper use of the thumbnail-related code (and have had a hard time finding a good summary of this info so far, just many variations on how it's done).
$include = get_pages('include=717'); $content = apply_filters('the_content',$include[0]->post_content); echo '<em>' . $content . '</em>'; /* Get the latest message */ echo '<h4>LATEST ARTICLE</h2>'; $args = array( 'category__in' => 19, // exclude posts from this category 'posts_per_page' => 1, ); // The Query $the_query = new WP_Query( $args ); // The Loop if ( $the_query->have_posts() ) { while ( $the_query->have_posts() ) { $the_query->the_post(); echo '<h3><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></h3>'; echo '<p>' . get_the_excerpt() . '</p>'; echo '<p>' . wp_get_attachment_image_src($image_id, $imagesize, true) .'</p>'; echo '<p style="font-weight: bold;"><a href="' . get_the_permalink() . '">Read article</a></p>'; } } else { // no posts found } /* Restore original Post Data */ wp_reset_postdata();
June 24, 2015 at 12:34 pm in reply to: Menu sliding out of view in Author theme after CSS mod #157431cosmocanuckMemberI seem to have been able to resolve this by floating the menu left instead of right. The live example site will thus not show the problem, so I'm marking this issue as resolved. But it was very weird to see the menu going at twice the speed off the right edge, as I enlarged my browser window. Some day I hope to figure that one out.
August 26, 2014 at 5:12 pm in reply to: So simple, so frustrating: how to modify what's displayed in the post? #121223cosmocanuckMemberOK, the lightbulbs are starting to go on... I see my familiar pre-Genesis WP codes in lib/structure/post. I'm assuming I can (in my child theme of course!) unhook what I need, and revise as desired, in my own custom template page(s).
Feeling much more on top of this stuff... for the moment! 8^)
I think the trouble is that there are LOTS of tutorials out there that address "how to change what's grabbed by the loop" but not linking to the oh-so-closely-related topic of "how to change what is actually shown in each post"!
But as I say, the smoke seems to be clearing. Hmm, perhaps once I figure this out I'll write a tutorial of my own!
August 25, 2014 at 4:02 pm in reply to: So simple, so frustrating: how to modify what's displayed in the post? #121006cosmocanuckMemberA closer look at my code reveals that I'd left a couple of category-specific templates still active in my theme so they were overriding my category.php file. That out of the way, it still doesn't quite work - I'm only getting a single column, and one element - the date - seems to only be shown with the first post. So... I'm still baffled.
cosmocanuckMember@surefirewebserv, I realized that I should have read the link you posted - Jonathan actually had a link to that updated post at the top of his previous one i'd been working off - which of course IS outdated. Sigh.... Thanks again.
cosmocanuckMemberThank you thank you thank you EVERYONE! @genwrock, your code worked perfectly of course. Meanwhile I will check out your links, @suefirewebserv and @braddalton, for deeper understanding and - as always - more learning! Thanks again!
August 19, 2014 at 3:37 pm in reply to: Why Genesis? A philosophical question from a newcomer. #119873cosmocanuckMemberThanks everyone, and Carrie, it was especially great to read your thoughtful, helpful response!
I feel like, at this point, it's important for me to start focusing on some kind of standard framework and get to know it top to bottom - so I can build anything my clients need, quickly and with full understanding of what I'm doing! Genesis certainly looks like a good contender for that task.
Perhaps the tipping point for me is the support. I'm truly impressed at the speedy and helpful responses I've gotten here in the forum. All else being equal, that would win me over!
So, yes, I'm going to keep working on Genesis - and I'm glad to know I don't have to give up my template-file-based methods entirely!
Thanks to everyone for their input - and links to further reading.
adam
cosmocanuckMemberDisregard my last post, everyone - Lauren's suggestion DID work!
Thanks so much!
cosmocanuckMemberHere's a pastebin version. Lauren, I did use that code as well but it seemed not to make a difference...
cosmocanuckMemberD'OH! Yep - pretty obvious. Thanks for your second pair of eyes, Neil!
cosmocanuckMemberSorry, page 41 gave the full answer.
Might be good to edit the initial mention of headers on page 15, to indicate that there are actually two possible ways to do this. Right now, it rather misleadingly only mentions one possibility, which is not the case for all themes.
(Forgot to mention that I'm working with the initial Genesis Sample theme, which has no "Header" item under the Appearance menu. But I switched to the main Genesis theme, and still didn't spot a Header item.)
Thanks,
adam -
AuthorPosts