Helen Hou-Sandi
Forum Replies Created
-
Forum: Networking WordPress
In reply to: Programatically changing user rolesDoes http://wordpress.stackexchange.com/questions/4725/how-to-change-a-users-role provide any new leads? Don’t know how that would go over in multisite.
Forum: Fixing WordPress
In reply to: Find Posts by Author brokenHooray, glad it’s working! That’s actually a new one for me, too.
Side note: please mark this thread as resolved. Thanks!
Forum: Fixing WordPress
In reply to: Find Posts by Author brokenAh, it seems to me that the space (%20) is what is making it unhappy. I’d advise you to go back and change your username using the same method to chimpdaddy without the space. Be sure that user_nicename is the same.
No problem! Glad it’s working now π
It should just re-install the core WordPress files and leave your customizations alone. It’s like running upgrade, only it’s using the current version instead of a newer one. Try that first, and then we can dive in FTP if that doesn’t work.
If your dashboard is sort of working, you might be able to access http://yourdomain.com/wp-admin/update-core.php and use the blue Re-Install button. If that doesn’t work, do you know how to use FTP with your hosting account? If you download and unzip the WordPress package from http://wordpress.org/download/, you’ll be able to do just those folders.
Sounds like that file (and perhaps others) are not complete for some reason. class-simplepie.php is significantly longer than 1267 lines (over 15,000 actually). Try deleting and re-uploading the wp-admin and wp-includes folders.
Forum: Fixing WordPress
In reply to: Find Posts by Author brokenWhat’s the link that clicking your name gives you? Does the last part match your current username?
Forum: Fixing WordPress
In reply to: Small dot appearing in header of Weaver themeNot 100% sure how Weaver works, but the CSS you need is:
#ttw-head-widget ul { list-style: none; }Forum: Fixing WordPress
In reply to: How to check for custom post type and if it's hierarchicalDid you try what I suggested earlier?
if ( is_singular() && !is_post_type_hierarchical( get_post_type() ) ) {I think you probably mean that non-hierarchical post types (such as regular old posts) are articles, rather than hierarchical ones (such as pages).
I was out a lot longer than I thought π I made an example metabox that works: http://pastebin.com/fx854tXb
In prose, you take the values of the checkboxes, implode them with a comma as the separator (but the separator can be anything, really), and then save the CSV. Then, when displaying the metabox, you explode the CSV using that same separator and then check if the value of the checkbox you are currently displaying is in the array produced by explode. Hope that helps!
Sure, we can still work on checkboxes! And thanks for listening π I am on my way out, unfortunately, but will be back later with (hopefully) fresh eyes.
They suggest the same plugin because, well, it’s pretty awesome π And thank YOU for being receptive to concerns and other ideas. Sometimes people understandably get a little sensitive, but we’re all just trying to help each other out and get things done the best way possible. I always worry for those who have to continue to maintain a system that’s gotten out of hand, because I’ve been there. Sometimes it’s nice to use a plugin or at least write your own functionality plugin – then you can transfer the features even if the theme gets completely overhauled.
So, for a custom taxonomy, you can add it to multiple post types by using an array for the
$object_typeargument (the second one) when registering your taxonomy. You can then associate the product with a category. So, even though maybe in terms of concept, the product isn’t really in that category, it’s now related to it in some way. Then, in the theme, look for the product’s category or categories, then use a separate query to pull in the latest item from the category in the relevant post type. So, an example query:$custom_query['post_type'] = 'post'; $custom_query['posts_per_page'] = 1; $custom_query['tax_query'] = array( array( 'taxonomy' => 'tax_name', 'terms' => array($category->slug), 'field' => 'slug', ), ); $queryObject = new WP_Query($custom_query); // The Loop... if ($queryObject->have_posts()) { while ($queryObject->have_posts()) { $queryObject->the_post(); // loop-type stuff to display your latest driver } }Note that the array value for terms probably would not work at all. You’d have to determine the category slug (probably using
wp_get_object_terms()), and do a foreach if there’s more than one category.Thanks for posting all of your code, too. If we need to reference it again, it’s there. I did notice that you are using nonces π
Can you pastebin your entire code for the metabox? It’s kind of hard to see what’s going on with just snippets. Also, is this you on the WordPress StackExchange? http://wordpress.stackexchange.com/questions/27699/add-meta-box-with-multiple-check-boxes-and-save-update-custom-fields
Basically, you need to use
implodebefore you save the post_meta, andexplodebefore you set your checked boxes in the metabox. From what I see, you’re now setting a hidden field with the CSV. This is not going to help with your checkboxes at all. Are you comfortable with checkboxes in PHP to begin with? They are perhaps the least friendly of the form fields.If you can’t handle using the post_meta functions very well, my opinion would be that you should really rethink trying to write this yourself, especially if this is for a client and you will need to continue to support the application. You can use custom taxonomies for more than one post type, and the really solid Posts 2 Posts plugin can help with the post relationships you’ve described. I can’t imagine why you’d want to reinvent the wheel with a metabox, and I can imagine memory usage getting out of control if there are a lot of items being loaded into those checkboxes. You’re loading up ALL of the post data just to get the ID and title. There is nothing wrong with using a solidly developed plugin in a business application. scribu (the plugin author) is very dependable and will not write bad code. Then again, perhaps you have some kind of usage idea that I’m not seeing.
Forum: Fixing WordPress
In reply to: wp-load not workingACTUALLY, I just remembered you’re doing something outside of WordPress. If this doesn’t work, try
error_reporting(E_ALL);at the top of your custom file instead. There are some other methods of turning on error reporting globally, so if those don’t work, there are some other options.