fireproofsocks
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Content Type Manager] Field PHOTO problem with overlay blackThis should be in the bug-tracker: https://code.google.com/p/wordpress-custom-content-type-manager/issues/detail?id=555
Forum: Plugins
In reply to: [Custom Content Type Manager] Version: 0.9.7.13 Break out of your blog! ???I’m sorry, I still don’t know what you’re referring to. The plugin’s name is “Custom Content Type Manager”. That’s defined in the plugin’s primary file (index.php) and in the plugin’s readme.txt file. The “Break out of Your Blog” is just a descriptive tagline… using the CCTM lets you get more out of wordpress and do more than what you can with a simple blog. I am not the author of the Custom Field Template, so I can’t comment on it. I’m still not sure exactly what you’re asking, but hopefully that clarifies.
I don’t know if there’s an easy fix for that — sounds like there is a conflict with the plugin, and due to WP’s architecture, these are difficult to troubleshoot and difficult to avoid.
Forum: Plugins
In reply to: [Custom Content Type Manager] Custom post type subcategories page?Man, that’s a good question — this is definitely more of a general WP and styling question though, so I’m not sure I’m the best one to take a guess at how to solve your particular problem.
Glad you got it figured out. Keep up the good work.
Forum: Plugins
In reply to: [Custom Content Type Manager] Version: 0.9.7.13 Break out of your blog! ???Sorry if you’re having problems. I’m not sure what you’re asking. If you’d like to report a bug, I’d need to know specific details — see https://code.google.com/p/wordpress-custom-content-type-manager/wiki/ReportingBugs for more info.
If you need to tag a post as belonging to multiple categories, then you probably should leverage WP tags/categories for it. Then you should be able to leverage your theme’s category page to display posts that have been placed into one category or another.
I don’t know if there is always a “best” way to do a certain thing… there are a lot of ways to accomplish any task, so try an approach and see if it works for you.
This wiki page might be relevant to you: https://code.google.com/p/wordpress-custom-content-type-manager/wiki/get_posts_examples#List_Posts_in_a_Category (specifically that example with “List Posts in a Category”). The examples there rely on the PHP, but for most of them, there is a way to do the same query with the shortcode. E.g.
$args = array(); $args['post_type'] = 'article'; $args['post_status'] = 'publish'; $args['taxonomy'] = 'category'; $args['taxonomy_slug'] = 'howto'; $args['orderby'] = 'menu_order'; $args['order'] = 'ASC';Becomes
[summarize_posts post_type="article" post_status="publish" taxonomy="category" taxonomy_slug="howto" orderby="menu_order" order="ASC"]As I mentioned in the other post, you’ll notice that taxonomies and custom fields can become blurry. You can organize your data to use taxonomies — the advantage to that is you tie into existing WordPress functionality, but the disadvantage is that it’s opaque and hard to see.
Here’s one idea that might be relevant to you. You could create a dropdown custom field containing the possible values for your posts. E.g. a dropdown with “RV Books & Media”, “RV Blogs”, “RV Forums”, etc. and then attach that field to your post_type. It’s a good idea to use separate keys/values (e.g. rv_books => RV Books, rv_forums => RV Forums). For each post, you could select one of the values in your custom field. Then your search would look something like:
[summarize_posts post_type="your_post_type" your_dropdown_field="rv_books"]You’ll notice here that taxonomies allow you to select multiple values (e.g. a post might be associated with both RV Books and RV Forums), whereas the dropdown option can only have one value. You would need to create separate pages for each query in that example.
Hope that makes sense — there are lots of ways to do this, but that’s one approach.
Forum: Plugins
In reply to: [Custom Content Type Manager] CCTM Plugin & Customizr Theme – Display IssueI’m glad if my comments are helpful.
As you work with your theme, keep in mind that there are 2 sides to this: one is storing the data (i.e. the modeling of the data), the second is displaying it. Your theme will need to be adapted to format the custom data.
Forum: Plugins
In reply to: [Custom Content Type Manager] how to filter on datefieldI added the feature request for you:
https://code.google.com/p/wordpress-custom-content-type-manager/issues/detail?id=554MySQL should already be the default date format — if that’s not coming up, that’s a bug.
Categories represent data that is completely separate from the post data. The GetPostsQuery class and its related functions only retrieve post data from wp_posts and wp_postmeta. All taxonomies and associations between them are stored in entirely different tables, so your query there specifying “categories” as an argument would only serve to corrupt the resulting database query unless you had a custom field named “categories” (which would be confusing for reasons that I hope are obvious). Secondly, your argument format must specify key/value pairs, e.g. $args[‘some_field’] = ‘Some Value’, so it won’t work times two (?) because you’ve only specified a value “categories”.
There are examples in the wiki, e.g. retrieving posts in a given category: https://code.google.com/p/wordpress-custom-content-type-manager/wiki/get_posts_examples#List_Posts_in_a_Category
You need to use the built-in WP functions for retrieving a post’s categories, e.g. http://codex.ww.wp.xz.cn/Function_Reference/get_the_category and/or http://codex.ww.wp.xz.cn/Function_Reference/get_the_category_list
e.g. something like this:
<?php $Q = new GetPostsQuery(); $args = array(); $args['post_type'] = 'services'; $results = $Q->get_posts($args); foreach ($results as $r) { print '<h3>'.$r['post_title'].'</h3>'; $categories = get_the_category($r['ID']); // lookup of for this post-id print 'Categories this post is associated with: '; foreach ($categories as $c) { print '<a href="'.get_category_link( $c->term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $c->name ) ) . '">'.$c->cat_name.'</a>' } } ?>I’ve added this example to the wiki for the benefit of others.
Forum: Plugins
In reply to: [Custom Content Type Manager] how to filter on datefieldIt can be disastrous for the plugin to attempt to alter formats after they have been entered because you run the risk of corrupting data, so that was very much a conscious decision to error on the side of safety. Values are changed only when creating new posts or editing existing ones and the date value is re-written to the database — that’s what I was referring to with my earlier comment about this situation being painful.
The messaging for date fields does recommend to use the MySQL date format because it’s sortable, but I still get posts like this fairly regularly so it would make a good feature request if you care to file it.
Forum: Plugins
In reply to: [Custom Content Type Manager] get_posts multiple meta_keys?Try debugging the query using the debug option — if there’s a bug in the query generation, then please file a bug. It could be that null/zero values are not being stored in the database at all, in which case the query would fail: you’ll have to look at the raw data to determine that though.
Forum: Plugins
In reply to: [Custom Content Type Manager] CCTM Plugin & Customizr Theme – Display IssueIt’s helpful if you can boil this down to a short and specific question if possible.
If you want to remove all traces of a post type, there are global options in the CCTM settings page for you to do this — it’s not enabled by default because it does irreversibly delete items from your database.
Much of the discussion here seems to revolve around how to model your data — that’s a skill and not something I can impart easily. You do notice how the data structures for post_types and related posts starts to look a lot like taxonomies — it’s a grey area. Taxonomies in my mind enable you to search for and find your data more easily, whereas post_types and relations are the meat of the thing. Anything that you can think of that has a distinct and unchanging set of attributes works well as a post type — e.g. an “RV Periodical” might have a name, a publisher, a homepage link, etc. I’m not sure what you’re storing with a “forum”, but that might work simply as a single field: a link.
Not sure what other guidance I can offer.
As a side note: WordPress may not be the ideal tool to model data in this complexity. I say that often, but I’m rarely heeded.
Forum: Plugins
In reply to: [Custom Content Type Manager] get_posts multiple meta_keys?The “between” operator is tricky so it’s not supported directly. See https://code.google.com/p/wordpress-custom-content-type-manager/wiki/get_posts#Operators
There are, however, workarounds. E.g. you can get all the posts posted in a given month (or day or hour etc) using “starts_with”:
$args['post_date']['starts_with'] = '2014-04';You can set the “date_column” argument and then use the “date_min” and “date_max” arguments to specify an arbitrary range:
$args['date_column'] = 'my_custom_field'; $args['date_min'] = '2013-03-13'; $args['date_max'] = '2014-04-14';