DeBAAT
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Media Category Management] Can't Get Started…Hai Anna,
I’ve tested your request and I’m sorry to say that what you would like is currently not possible with this plugin.
It seems to work only with categories and not with tags, although it does seem to. I’ll have a look soon to try to fix it.
In the meantime, would it be possible for you to use categories in stead of tags?Forum: Plugins
In reply to: [WP Media Category Management] Can't Get Started…Hai Anna,
Sorry to read you are disappointed.Looking at your screenshot (very helpful), it looks like you are using the “Tags” category for media. The “(P)” shown in front of it indicates that this is a category also used for posts. This also implies that managing this category is done in the menu related to Posts.
You should be able to use these categories in the media pages.
Hope this helps.
Forum: Developing with WordPress
In reply to: Using by reference of WP_Query in posts_search filter hook?Thanks Mark for this quick reply.
Maybe I should rephrase my question:
Looking at the implementation, what would be the proper use of “&$this by reference”?
It seems to offer the option to change the values of the WP_Query object but these changed values are never used.
Instead, it is using $q, which is the shorthand for query_vars: “$q = &$this->query_vars” and set before the call to posts_search.
Forum: Plugins
In reply to: [WP Media Category Management] Gallery images incorrectHai.
Looks like there is a misunderstanding between the terms category and gallery.
A gallery is a way to group media files together and use that as some sort of shorthand for that group.
A category is a different way to group media files by assigning a category to each media file.From the description above, it looks to me that you are using galleries by assigning categories.
The situation you would want can be created using the shortcode parameter “alternative_shortcode“. It works as follows:
Suppose you want to have a gallery with ids=”20,18,19″. Then you should create a MCM category, e.g. “canada” and assign these three media to that category.
Then the post with the following shortcode for galleries:[gallery ids="20,18,19"]should have the same result as the following using the category:
[wp-mcm alternative_shortcode="gallery" category="canada"]Hope this helps.
Forum: Plugins
In reply to: [WP Media Category Management] Filter not Appearing on custom postHai Austin,
A strange issue indeed.
I’ve tried it myself and it looks like there might be a quick fix.
Can you enable the option to support thumbnails for this particular post_type?
You can find the check box on the “Display Sections” section when editing the custom post type.Hope this helps.
Best regards,
JanForum: Plugins
In reply to: [WP Media Category Management] MCM Categories only seen on second instanceHai Pablo,
Thanks for the compliments and for bringing this glitch to my attention.
It is indeed a limitation of my plugin. It will be fixed in the new version V1.4.3.For your information:
The issue is caused because of the test which is preventing the code to be included on every page. In this case, the test was too strict as it didn’t allow the code for the page “post-new.php”. The page “post.php” was allowed which led to the behaviour you described.Forum: Plugins
In reply to: [WP Media Category Management] WooCommerce/Custom Posts categories possible?Did you already solve this?
If not, could you try whether it works by using the WooCommerce/Custom Posts categories as MCM Taxonomy to Use (see WP MCM Settings)?I’m closing this issue now.
If you have any more questions, please open a new one.You’re welcome!
Forum: Plugins
In reply to: [WP Media Category Management] No media attachments foundSorry to read this.
Did you click on the “Filter” button?
If that doesn’t help, can you then provide me some more information on the configuration you are using?
If I try the same on my site, this works.Did you try using the shortcode in your post or page?
It should look something like:[wp-mcm category="mediafoto,medialogo"]Where the text “mediafoto,medialogo” indicates two comma separated categories.
You can always have a look at the function “mcm_get_attachment_ids()” on line 184 of file “wp-mcm-functions.php”.
I use this function to filter out the IDs using the tax_query.
Hai.
I did receive a screen shot but that didn’t help.Your question however triggered me and maybe I’ve found the issue now.
Looking at the code examples above, I noticed a difference in the query array definitions.$media_categories = 'test-mcm'; if ( !is_array($media_categories)) { $media_categories = array ( $media_categories ); } $category_args = array('post_type' => 'attachment', 'post_parent' => null, 'tax_query' => array( // This is an additional array level, needed to use multiple queries array('taxonomy' => 'category_media', 'field' => 'slug', 'terms' => $media_categories ) ), );The ‘tax_query’ should be an array of commands used to search a taxonomy. When you would want to combine multiple taxonomy queries, you could combine them with “‘relation’ => ‘AND'”.
Hope this helps.
Forum: Plugins
In reply to: [WP Media Category Management] Issues with "No categories"Strange.
I just updated to WP 4.1.1 too and all tests seem to be ok.
I also tested using the nl_NL translation which works fine.
Can you mail me your french translation files?
And would you mind if I include them in the next release?Forum: Plugins
In reply to: [Gravity Forms + Custom Post Types] Select CPT on front-end?When using this solution, you indeed do not need this plugin…
I have implemented it myself now with the function shown below.
It can be used by any form, you don’t need to use the form id.
It checks whether there is a post_id defined in the entry.
Next, it checks all fields supplied whether the value contains an existing post_type.
In the form itself, I used a dropdown field to enable the user to select the post_type. Make sure that the values of the dropdown correspond with the post_types defined./** * Use a custom post type if defined by a field in the form * */ public function wps_gf_set_post_type($entry, $form) { // Get the post_id if it exists if (isset($entry['post_id'])) { $post_id = $entry['post_id']; } else { return; } // Check the values of the form fields if (isset($form['fields'])) { foreach ($form['fields'] as $field) { if (isset($entry[$field['id']])) { // Get the value entered for this field $entry_value = $entry[$field['id']]; // If an existing post_type is found, then use it for this post if (post_type_exists($entry_value)) { set_post_type($post_id, $entry_value); return; } } } } }