earthmanweb
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: Query Multiple Taxonomies] Error on ActivateAfter I posted this, I did, and was able to upgrade it.
I forgot to remove the topic after I fixed it…thanks!
On a sidenote – how do I get my Name and Gravater to link to my website, like yours does? I filled in my website url in my profile…
Forum: Fixing WordPress
In reply to: Terms of Custom Taxonomy in a Dropdown MenuHi bedex78,
You can use this:
http://codex.wordpress.org/Template_Tags/wp_dropdown_categoriesexample:
<?php wp_dropdown_categories('show_option_none=Select category&show_count=1&orderby=name&echo=1&taxonomy=custom_taxonomy_name');I don’t really like that one, though, because you are forced to use the taxonomy ID as the value, which, if you are using it for a jumpmenu, can make it difficult to work with custom taxonomy templates
I just wrote the function below which uses get_terms:
http://codex.wordpress.org/Function_Reference/get_termsIt uses the get_terms arguments (see codex link above) by passing them through the $args array.
Advantages:
– creates easy to use links to taxonomy templates
– you can add multiple taxonomies to the dropdown listDisadvantages: I haven’t figgred out how to add ‘count’ yet, along with other parameters that wp_dropdown_categories offers.
<?php function get_terms_dropdown($taxonomies, $args){ $myterms = get_terms($taxonomies, $args); $output ="<select>"; foreach($myterms as $term){ $root_url = get_bloginfo('url'); $term_taxonomy=$term->taxonomy; $term_slug=$term->slug; $term_name =$term->name; $link = $root_url.'/'.$term_taxonomy.'/'.$term_slug; $output .="<option value='".$link."'>".$term_name."</option>"; } $output .="</select>"; return $output; } $taxonomies = array('custom_taxonomy_name'); $args = array('orderby'=>'count','hide_empty'=>true); echo get_terms_dropdown($taxonomies, $args); ?>Hope this helps!
Forum: Plugins
In reply to: sort posts by custom field IN BACKENDyeah, t31os_ , this code is gold for me right now!
I ran into a conflict with another custom column I defined, so I changed it slightly to the following:
function add_meta_column($column_name,$post_id) { $metakey = ( isset($_GET['meta_key']) && $_GET['meta_key'] != 'All') ? esc_attr($_GET['meta_key']) : ''; if( $column_name == 'meta' && '' != $metakey ): //note change here on 'if block' $val_num = 1; echo "\n \t"; if( SHOW_META_MULTIPLE ) { $meta = '<p>' . $val_num++ . ': '. implode( '</p>' . "\n \t" .'<p>' . $val_num++ . ': ', get_post_meta( $post_id , $metakey , false ) ) . '</p>' . "\n"; } else { $meta = '<p>' . $val_num++ . ': '. get_post_meta( $post_id , $metakey , true ) . '</p>' . "\n"; } echo $meta; return; endif; }Thanks so much for this!!!
Forum: Plugins
In reply to: [Plugin: Query Multiple Taxonomies] Plugin break taxonomy.php templatethis would be great, but I installed it on Beta 2 and it doesn’t seem to be working on my site…
I am using two custom taxonomies (locations, job-category), and a custom page type (jobs).
Here’s my query
?post_type=jobs&locations=beaver-valley&job-category=science-technology&post_status=publish&orderby=date&order=DESC&posts_per_page=15&paged=1I am using the following code to change my query:
$wp_query = new WP_Query(); $new_query_vars = "?post_type=jobs&locations=beaver-valley&job-category=science-technology&post_status=publish&orderby=date&order=DESC&posts_per_page=15&paged=1"; $wp_query -> query( $new_query_vars );With the code above, WordPress only filters on the ‘job-category’ taxonomy. When I remove that, the ‘locations’ filter works just fine.
I installed the plugin, but I get the same results…
Please, am I doing something wrong?
Also, is this code going into Core soon? This seems like a pretty vital piece of functionality, IMO.
Thanks!
Forum: Fixing WordPress
In reply to: Query posts with custom term not ordering postsHi Michael,
I tested your code and it was not working either.
I tracked it down to a conflict with the “postmash” plugin…
Thanks for your time!
Forum: Fixing WordPress
In reply to: Query posts with custom term not ordering postsHi Michael,
I am using query_posts, not the code you are using.
I am not sure how your posted code relates to my question…?
I can try your code instead of query_posts, but that doesn’t really solve the problem, being the query_post issue.
Forum: Plugins
In reply to: [Plugin: cformsII] Dynamic formsFrom the CformsII website
to use this feature it requires basic and possibly more advanced PHP knowledge, examples you’ll find in the HELP! section of plugin admin pages.
Forum: Fixing WordPress
In reply to: Thumbnails not showing after upgradeit would seem this bug has been fixed in the latest versions.
CND, can you confirm the same?
Forum: Fixing WordPress
In reply to: Thumbnails not showing after upgradeAfter I test this bug on the newest release, I am planning to submit this to the WordPress Trac, anoyone have any suggestions, objections or comments prior?
Forum: Fixing WordPress
In reply to: Thumbnails not showing after upgradeI am experiencing a similar problem, where my plugin Shadowbox-JS is attempting to load files linked to by the “Link Image” feature in the WordPress image options. The link given is with a lowercase .jpg, but the actual file exists with an uppercase extension (.JPG) causing it to fail. It would seem there is a bug with 2.8’s uploader – anyone know which file to patch it in?
Thanks!
TForum: Fixing WordPress
In reply to: How can I filter posts belonging to 2 categories with query_posts()?Thanks for your quick response! I considered that, but was hesitant because i want to pull ONLY the most recent one from each category which is the reason for the limit of 6. I guess I could create a conditional loop:
ie:(i=0, i++, if(i>6){[don't output]})but I am wondering how much extra load that is going to create when the page is getting hit thousands of times….do the results of a query like that get cached….?
Forum: Fixing WordPress
In reply to: How can I filter posts belonging to 2 categories with query_posts()?Thanks for the help so far in this thread, very useful.
I am having trouble with one thing, i am trying to get two sets of the latest posts that exist in categories 11,13,15,17,19,21 and then another loop that contains posts in cats: 12,14,16,18,20,22, but I ALSO want to ensure that all of the posts pulled are members of category 7 (7 is NOT the parent of the others).
I was trying these two queries:
query_posts(array('cat=11,13,15,17,19,21', 'category__and'=>array(7),'showposts'=>6,'orderby'=>menu_order,'order'=>ASC));
query_posts(array('cat=12,14,16,18,20,22', 'category__and'=>array(7),'showposts'=>6,'orderby'=>menu_order,'order'=>ASC));but the results end up being identical. Any help you can offer is greatly appreciated, please?
Forum: Plugins
In reply to: Is there a subscription paypal plugin that actually works with 2.5?oops, latest version is here:
http://www.codeplex.com/easypaypal/Release/ProjectReleases.aspx?ReleaseId=12464
Forum: Plugins
In reply to: Is there a subscription paypal plugin that actually works with 2.5?Have you tried this one?