rogersabboes
Forum Replies Created
-
Forum: Plugins
In reply to: check multiple taxonomies in WHERE statement of SELECT QueryXerotones code works perfect! How is it possible to get an array with all the tax-terms which are matching the original post’s terms into the result object?
The object foreach related post looks like this:
stdClass Object ( [object_id] => 458 [matches] => 4 )and I’d like it to look like this:
stdClass Object ( [object_id] => 458 [matches] => 4 [matching_terms] => Array( [0] => 146 [1] => 155 [2] => 190 [3] => 213 ) )Can this be done? Thank You for help!
Forum: Themes and Templates
In reply to: Display only assigned tags of custom taxonomies in archiveThis issue has been resolved here: http://wordpress.org/support/topic/423280?replies=8
Forum: Fixing WordPress
In reply to: wp_query – nopaging – how to?This is absolute perfect! It just works when merging the args!
I think adding a specific tag to to the query arguments would’nt help in my case, because the function is supposed to get the arguments automatically, depending on which site the user navigates to.
Thanks all a lot for solving my problem!
Forum: Fixing WordPress
In reply to: wp_query – nopaging – how to?Actually I want to have a list of categories in the sidebar of my theme. Only those categories should show up in the list which are assigned to the posts shown in the loop.
So lets say I navigate to main page where all posts show up, the category-list would list all categories. When I navigate to a tag-archive (?tag=anything), the category list should only show those categories which are assigned to the posts in this specific tag-archive. And so on..
I use this function for it in the sidebar:$cat_array = array(); $args=array( 'posts_per_page' => '-1'); $currentposts = new WP_Query($args); foreach($currentposts->posts as $currentposts->post) { foreach(get_the_category($currentposts->post->ID) as $category) { $cat_array[$category->term_id] = $category->term_id; } } $cat_ids = implode(',', $cat_array); wp_list_categories('include='.$cat_ids.'&title_li=Author Categories&show_count=1');When I use $currentposts = $wp_query; instead of the new WP_query, everything works perfect, except that global $wp_query onyl considers a maximum of 10 posts, as this is the number i set at the WP reading settings.
Forum: Fixing WordPress
In reply to: wp_query – nopaging – how to?Yes thanks esmi, this one solves the problem partly. I’m getting now all the posts instead of only ten.
It looks like so:$args=array( 'posts_per_page' => '-1'); $currentposts = new WP_Query($args);But still the query ignores the querystring from the current url. The result of the query is static, it retrieves all the posts all the time, no matter if the current page is for instance http://www.root.net or http://www.root.net?tag=anything .
So I need somehow make the new WP_Query consider the global $query_string (like for instance: ?tag=anything), just the way like the global wp_query would do it.Forum: Themes and Templates
In reply to: Display only assigned tags of custom taxonomies in archiveOk I found a solution doing the trick by modifying a function by MichaelH (http://wordpress.org/support/topic/327333?replies=34).
$cat_array = array(); foreach($posts as $post) { foreach(get_the_category($post->ID) as $category) { $cat_array[$category->term_id] = $category->term_id; } } $cat_ids = implode(',', $cat_array); wp_list_categories('include='.$cat_ids.'&title_li=Categories in the current loop');This function shows a list of all categories included in those posts which are currently shown within the loop. When I put it f.i. in my sidebar i can see all the categories from my current query, no matter if I’m on an archive-page, a query-page or on the index-page.
This function works only for categories. How do I change it that it also lists custom taxonomy-tags, and probably also ‘Tag-tags’ and custom field-values which are currently shown in posts from the loop?
Another problem I have with this function is that the list ignores categories which are not listed on the first page. For example when I have an archive-page with 15 posts and the first ten are shown at ?cat=22 and the remaining 5 on ?cat=22&paged=2, I will get 2 different results in the category list, including only those categories which are on the specific page. Is there an option to get always the same list, no matter if the posts are on more than one page?
Thanks a lot!Forum: Plugins
In reply to: [Plugin: AmR iCal Events List] Calendar of just past eventsworks perfect now! thanks a lot!
Forum: Plugins
In reply to: [Plugin: AmR iCal Events List] Calendar of just past eventsthx, I’ll give it a try and let you know!
Forum: Plugins
In reply to: [Plugin: AmR iCal Events List] Calendar of just past eventsForum: Plugins
In reply to: [Plugin: AmR iCal Events List] Calendar of just past eventsI have the same problem as poidokan does. Funny thing is: everything worked just fine for me in the past (i use the plugin for one month), the previous events showed up perfectly. The warning message started to appear a day ago although I didn’t change anything on the plugin or it’s configuration. So probably it has something to do with PHP. My server runs version 5.2.13.