lostbythelake
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Crash after update to 3.9.1Thanks so much Esmi. All worked like a charm.
Cheers
Forum: Fixing WordPress
In reply to: Crash after update to 3.9.1Option number two seems to have done the trick for now. Should I just retry the update? Or do you have any suggestions as to what I should do before doing so? I believe the issue may have been that I also had some plugins that needed updating. Should I update the plugins first and then update WordPress?
Forum: Plugins
In reply to: [Font Awesome Menus] How to use an icon in the site title or taglineWould love to know how you got this figured out. I need a fix for this too. Let me know if you can share you wisdom.
Forum: Plugins
In reply to: [Dropbox Folder Share] Folder not showing upNevermind, I figure it out! Cheers.
Forum: Plugins
In reply to: [WP HootSuite Dashboard] Unexpected Redirect to HootSuite.comJust tried your plugin, and I had exactly this happen. It really is too bad that Hootsuite has such a redirect function. Would be nice to see this resolved if you guys can find a way around it.
Forum: Fixing WordPress
In reply to: Adding post class to div with printfAlchymyth,
Thank you, thank you, thank you!!! And just for good measure, another thank you.
This worked so well I figured out that I only needed the category tied to the image class to style my elements appropriately! Makes my css much cleaner and my pages less cluttered.
Not sure what part of the world you are in, but if I’m there, I owe you a beer ??
Cheers,
Karl
Forum: Fixing WordPress
In reply to: Adding post class to div with printfOk, this one last thing. What you’ve given me totally worked! Gives me exactly what I asked for. Thank you for being so patient with me. However, I just noticed that in order for my css styling to work as expected, I also need to add the category to the image class. Here’s my full function:
function apparition_do_post_image() { if ( ! is_singular() && genesis_get_option( 'content_archive_thumbnail' ) ) { $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'alignleft post-image' ) ) ); if( ! empty( $img ) ) { echo '<div class="alignleft'; foreach(get_the_category() as $cat) { echo ' category-'.$cat->slug; }; echo '">'; printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img ); echo '</div>'; } } }
You’ll notice that in the first if statement, the image is declared and the class is defined as ‘alignleft post-image’. I just need to add the category to that class and then I’m finally there.
I must thank you for all the help so far. I can’t thank you enough for this.
Forum: Fixing WordPress
In reply to: Adding post class to div with printfAlchymyth, thank you so much for the help! Although it works, I’ve noticed that some of the information from post_class is impacting some of my previously styled items in my css. Given that I only need the category to style the div, I was wondering if I should probably be using get_the_category instead of post_class to avoid the extraneous information. Is there any way to use get_the_category in the same manner you have here instead of post class?
Furthermore, I need the class alignleft to be included as a class in all instances. If you can help me figure that out, I’m home free!
In effect, I need the output to be <div class”alignleft category”><img /></div>
Forum: Fixing WordPress
In reply to: Adding post class to div with printfSorry, I’m quite new to php. All I am trying to do is wrap an image in a div that contains the post class info so that I can style it accordingly using css. The original function is as follows:
if( ! empty( $img ) ) printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img );
This on it’s own works just fine, however the image is output on it’s own without a surrounding div. My hope was to wrap that image in a div with a post class so that I may style the image and the div wrapped around it based on its category.
Alchymyth, I imagine there is a more simple way of doing this, but I’m a little stumped. Any help would be greatly appreciated.
Chris, thanks so much for the code. However, the printf for the image is now throwing an error instead. I believe there should have been a leading quote before the anchor tag, but that doesn’t seem to completely fix it either.
Thank you in advance for your time and consideration on this. It really means a lot.