Michael Fields
Forum Replies Created
-
Forum: Plugins
In reply to: [Taxonomy Terms List] [Plugin: Taxonomy Terms List] display it on pagesForum: Plugins
In reply to: [Taxonomy Terms List] [Plugin: Taxonomy Terms List] display it on pagesForum: Fixing WordPress
In reply to: fopen() Cron ErrorI was hacking around a bit this morning with the wp_remote_request() function which calls fopen(). I used a very simple request which sent my whole system spaz-out:
$test = wp_remote_request( 'http://localhost/3.1/', array( 'topics' => 'ajax' ) );However, the function worked fine when accessing a true remote url:
$test = wp_remote_request( 'http://wordpress.mfields.org/', array( 'topics' => 'ajax' ) );Is there anything that I need to configure in windows to stop this from happening? It happens rather frequently for me.
Forum: Plugins
In reply to: [Taxonomy Terms List] [Plugin: Taxonomy Terms List] display it on pagesPut the following code in archive.php where you would like the description to be displayed:
if ( is_tax( 'location' ) ) { print term_description(); }Edit each term of the location taxonomy adding a description for each one.
- mba-in-uk
- mba-in-india
- mba-in-africa
- mba-in-china
You should now see the description displayed in your archive template.
Forum: Plugins
In reply to: [Taxonomy Terms List] [Plugin: Taxonomy Terms List] display it on pagesIf you are set on using page templates for this, then you make a custom page template and code a conditional:
if ( is_page( 'your-page-slug' ) ) print 'My message'; else if ( is_page( 'a-different-page' ) ) print 'A different message';repeat as much as necessary…
Multiple taxonomy queries are a part of WordPress 3.1 and are working rather well in the Beta version.
3 Bookmarks about javascript:
http://wordpress.mfields.org?topics=javascript2 Bookmarks from WP Hardcore:
http://wordpress.mfields.org?source=wp-hardcore1 Bookmark about javascript from WP Hardcore:
http://wordpress.mfields.org/?topics=javascript&source=wp-hardcoreThis is probably the best way to do this IMO… but 3.1 is still in Beta at the moment….
Forum: Plugins
In reply to: [Taxonomy Terms List] [Plugin: Taxonomy Terms List] display it on pagesno but i want myself to write for every country, like mba-in-usa, mba-in-uk etc,
is there anything in that,
by that time i ll also try the above oneOh, so I guess I did misunderstand you. Try this plugin instead.
Forum: Plugins
In reply to: [Taxonomy Terms List] [Plugin: Taxonomy Terms List] display it on pagesIt will use the description that you entered for the term in the administration panels
Forum: Plugins
In reply to: [Taxonomy Terms List] [Plugin: Taxonomy Terms List] display it on pagesTry something like this:
if ( is_tax() || is_category() || is_tag() ) { $term = $wp_query->get_queried_object(); $taxonomy = get_taxonomy( $term->taxonomy ); $taxonomy_name = ''; if ( isset( isset( $taxonomy->singular ) ) { $taxonomy_name = $taxonomy->singular; } else if ( $taxonomy->label ) { $taxonomy_name = $taxonomy->label; } print '<h1>' . $taxonomy_name . '</h1>'; if ( isset( $term->term_id ) && isset( $term->taxonomy ) ) { print term_description( $term->term_id, $term->taxonomy ); } }Forum: Plugins
In reply to: [Taxonomy Terms List] [Plugin: Taxonomy Terms List] display it on pagesIf I am understanding you correctly, you are seeking to display multiple posts having a term of one of these taxonomies on a page. If so, this is the incorrect way to go about doing this.
WordPress 3.0 allows you to query for all posts associated with a term in a given taxonomy.
/?location=taco-palacewould display all posts located at the Taco Palace. The permalink alternative would look like this:/location/taco-palace/. You can also create a taxonomy.php file to tweak the display of taxonomy archives.Please let me know if I have understood you correctly.
This is a known issue with displaying terms of custom taxonomies. Please see the Trac ticket here http://core.trac.ww.wp.xz.cn/ticket/14084
The only way I have found to fix it is when you register the taxonomy with WordPress set the
'update_count_callback'argument to'_update_post_term_count'.While this will definitely work in the short term, there are two things that you will want to consider:
1.
'_update_post_term_count'is a reserved function (most that begin with an underscore are) and it is generally a bad idea to rely on such functions from version to version. However, this is how WordPress itself registers categories and tags. Should be safe for 3.0 + 3.1.2. This fix should work for all examples that you listed, but it will not work for posts in the trash. For best results, do not use the trash or empty it frequently.
Wish there was a better solution that I could offer you. Feel free to voice your concerns in the Trac ticket I mentioned before. The best possible solution to this issue IMHO would be a change to core.
You might want to try get_object_terms().
You can fork the plugin and remove
if( is_single() )from line 54.When 3.1 hits the shelves, you might consider adding ‘post-format’ to the
$default_taxonomiesarray on line 64.I don’t believe that get_the_term_list() allows you to display count.
Heres one way of doing it:
$term = get_term_by( 'slug', 'term_slug', 'taxonomy_slug' ); print $term->count;Basically, anytime you have a term object at your disposal, you can use the count property.
Something important to mention: Currently, it is not really a good idea to rely on term->count to determine whether or not you should display posts. I have received reports from users of my Taxonomy List Shortcode that the terms will display with a count of one even if there are no published post associated with the term… if the post is a draft.
Here are a few trac tickets that seem to report the same type of issue:
http://core.trac.ww.wp.xz.cn/ticket/14392
http://core.trac.ww.wp.xz.cn/ticket/14084
http://core.trac.ww.wp.xz.cn/ticket/14073Forum: Plugins
In reply to: [Taxonomy Images] [Plugin: Taxonomy Images BETA] Include excludeThat would be really helpful. I want to add in more front-end goodness before I release 0.6. Please post the code to pastebin and I’ll have a look. Thanks!
Ok, Now I understand what you are looking for. You may want to consider using get_the_term_list() in your theme. This is the same function that the plugin uses to generate the term lists.