Michael Fields
Forum Replies Created
-
Forum: Plugins
In reply to: [Taxonomy Images] image size = fullVersion 0.7.2 fixes this. Should be live now.
Forum: Plugins
In reply to: [Taxonomy Images] image size = fullSorry ’bout that 🙂 Must be a bug somewhere. I’ve been able to duplicate. Will see if I can find a solution.
Forum: Plugins
In reply to: [Google Plus One Button] [Plugin: Google Plus One Button] Problem with 0.1.2Hi John,
Could you be more specific about your problem? What Theme Integration settings do you have configured? I did notice a bug where buttons were being printed twice. I corrected this, but it may be causing issues with your configuration.
A caching plugin could potentially be conflicting with the new version, but problems such as these should remedy themselves when the cache is updated.
Forum: Plugins
In reply to: [Google Plus One Button] [Plugin: Google Plus One Button] alignmentGlobal button alignment was added in version 0.1.2.
Forum: Plugins
In reply to: [Taxonomy Images] List of Categories With ImagesAre you talking about a javascript solution?
Forum: Plugins
In reply to: [Taxonomy Images] [Plugin: Taxonomy Images] Cannot change taxonomy image sizeThere will be an automatic method in the next release of taxonomy list shortcode plugin. There will be two template that support images + have paging functionality built right in. Just need to fix some bugs and do some testing. Probably about a week or two.
Forum: Plugins
In reply to: [Google Plus One Button] [Plugin: Google Plus One Button] alignmentNo worries, I wrote a simple integration of this last night, but want to make it better before I release the next version.
Forum: Developing with WordPress
In reply to: Pagination Taxonomy TermsFirst off … you should never, ever created a custom taxonomy named “type” as it is in the Reserved Terms list. Doing so will creates issues in places you would never expect. I would suggest changing it to “production_type” or better yet “mytheme_production_type”. Using your theme name as a prefix will avoid potential future conflicts.
As for the paging code. You can either:
A: Learn from the code posted here: https://github.com/mfields/taxonomy-list-shortcode/blob/master/taxonomy-list-shortcode.php#L32 This is from the next version of my Taxonomy List Shortcode plugin. The code is currently not ready to go, but the paging code is stable and tested.
B: Wait for me to finish-up and release the plugin. Should be a week or two. This plugin will have two custom templates that provide support for displaying images saved by the Taxonomy Images plugin.
Best,
-MikeForum: Plugins
In reply to: [Google Plus One Button] [Plugin: Google Plus One Button] alignmentUnfortunately, there is no way to do this without writing custom code. I’ll see if I can work a setting for this into the next release.
Forum: Plugins
In reply to: [Taxonomy Images] If statement?My bad, Got to that one pretty early this morning. Here’s how you do what you asked for:
/* * STEP #1 * Assign the output of the filter to a variable. */ $image = apply_filters( 'taxonomy-images-queried-term-image', '', array( 'attr' => array( 'class' => 'headerimage' ), 'image_size' => 'header' ) ); /* * STEP #2 * Now we will check the value of the $image variable. * if it is anything other than "empty" we will print * the value. */ if ( ! empty( $image ) ) { print $image; }Forum: Plugins
In reply to: [Taxonomy Images] If statement?First you will need to upgrade to version 0.7, Then you can add the following code to your theme’s functions.php file:
function mytheme_post_thumbnail_fallback( $html, $post_id, $post_thumbnail_id, $size, $attr ) { if ( ! empty( $html ) ) { return $html; } $categories = (array) apply_filters( 'taxonomy-images-get-the-terms', array(), array() ); if ( empty( $categories ) ) { return $html; } $image = ''; if ( isset( $categories[0]->image_id ) ) { $image = wp_get_attachment_image( $categories[0]->image_id, $size, false, $attr ); } if ( ! empty( $image ) ) { return $image; } return $html; } add_filter( 'post_thumbnail_html', 'mytheme_post_thumbnail_fallback', 10, 5 );This will hook into the get_the_post_thumbnail() function. If there is not post thumbnail set, it will use the “Taxonomy Image” from the category associated with the post. In the event that the post is in more than one category, this function will only return the first category’s image. I believe that categories will be sorted in alphabetical order.
You can then add the following code inside the loop to display images:
<?php $featured_image = get_the_post_thumbnail(); if ( ! empty( $featured_image ) ) { print $featured_image; } ?>Forum: Plugins
In reply to: [Taxonomy Images] [Plugin: Taxonomy Images] Cannot change taxonomy image sizeYes. All shortcode functionality will be moved to my taxonomy list shortcode plugin.
Forum: Plugins
In reply to: [Taxonomy Images] [Plugin: Taxonomy Images] Cannot change taxonomy image sizeNo worries 🙂 Moving forward, it’s best to use the following style of code. It will give you more flexibility to customize + it will be absolutely invisible if you ever decide to uninstall the plugin:
$terms = apply_filters( 'taxonomy-images-get-terms', '' ); if ( ! empty( $terms ) ) { print '<ul>'; foreach( (array) $terms as $term ) { print '<li><a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'detail' ) . '</li>'; } print '</ul>'; }You can read more about how to customize it here: http://ww.wp.xz.cn/extend/plugins/taxonomy-images/
Forum: Plugins
In reply to: [Taxonomy Images] [Plugin: Taxonomy Images] Cannot change taxonomy image sizePlease do not use the deprecated functions!!!! They may not exist in the future. That’s why I put them in the deprecated file and add comments that say “Do not use this!!!”.
Forum: Plugins
In reply to: [Taxonomy Images] [Plugin: Taxonomy Images] Cannot change taxonomy image sizePlease post the exact code that you are using in your template file. Please also return download and install a fresh version of 0.7. I cannot help you if you are modifying the plugin files directly.