waltervos
Forum Replies Created
-
Forum: Hacks
In reply to: Fetching serialized post_meta fields with XML-RPCUgh, nevermind. My mistake completely, it had nothing to do with any of this :-/
Forum: Plugins
In reply to: [Featured Image Widget] Uploaded image does not appearYeah, I suppose what I wrote isn’t entirely correct.
First and foremost, this plugin is meant for displaying the featured image. However, since the featured image feature ( ?? ) was new when I wrote this plugin, I decided to include a fallback mechanism for all those older posts on a blog that did not have a featured image set up. When you upload an image on the “Edit post” screen, WP couples the image with the post you’re editing. It’s set as an attachment. The plugin uses such images as fallback images. When an image has been upload via the media library and then inserted into a post however, the relation between post and image is not set in the database. So, in those cases the fallback mechanism doesn’t work.
Please be aware that I’m writing from memory, and it’s been a looong time since I’ve worked on this plugin ??
Forum: Plugins
In reply to: [Featured Image Widget] Uploaded image does not appearHi lauramba,
(this is a bit late, I know)
I’m not sure what you mean exactly. All the plugin does is show an image that’s been set as the featured image of the post/page that’s currently being viewed. Any uploaded image can be used for that, but you’ll have to explicitly set it as a featured image to get it to show up in the widget. And, if you’ve already added it to the body text, it would show up twice in that case.
-Walter
Hi saharita,
(this is a bit late, I know)
What do you mean exactly? The plugin is not supposed to output any text, just the image. If it’s outputting text as well, please send a link so that I can try and figure out the problem.
-Walter
Forum: Plugins
In reply to: [Yoast SEO] Bug: Fatal error from unexpected option in databaseHere is the better fix, I believe.
Very well. I’ve fixed it with your solution, for now, and I’ve directed the author to this thread.
I’m not sure I completely understand the code, but wouldn’t it be better to rename the variable in the foreach statement? Like so:
function multisite_defaults() { $option = get_option( 'wpseo' ); if ( function_exists( 'is_multisite' ) && is_multisite() && !is_array( $option ) ) { $options = get_site_option( 'wpseo_ms' ); if ( is_array( $options ) && isset( $options['defaultblog'] ) && !empty( $options['defaultblog'] ) && $options['defaultblog'] != 0 ) { foreach ( get_wpseo_options_arr() as $wpseo_option ) { update_option( $wpseo_option, get_blog_option( $options['defaultblog'], $wpseo_option ) ); } } $option['ms_defaults_set'] = true; update_option( 'wpseo', $option ); } }
I mean, the problem seems to be that the programmer expects $option to still have the same value while in reality it has been overridden in the foreach statement.
Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] each_connected doesn't seem to workNevermind? Updating to 0.9.1 did work for me. I ran into something else though. In filters p2p_connected_args and p2p_connectable_args, was $args[‘post_type’] always an array? It is now, and I’m wondering if it’s supposed to be.
‘Nuff respect for your great work on this fantastic plugin by the way! This opens up so many interesting possibilities for WordPress development :).
I don’t see the widget appearing anywhere. Your problem is related to your theme though, not the widget. In firefox there is a sidebar with various widgets visible, in chrome there isn’t. I don’t know what the exact problem is but maybe you should just try another theme.
So, this is how I ended up fixing it:
class My_P2P_Box extends P2P_Box_Multiple { protected function get_query_vars($post_id, $page, $search) { global $wpdb; $query_vars = parent::get_query_vars($post_id, $page, $search); $query = "SELECT $wpdb->p2p.p2p_to AS post_id FROM $wpdb->p2p"; $results = $wpdb->get_results($query); $r = array(); foreach ($results as $row) $r[] = $row->post_id; $query_vars['post__not_in'] = $r; $query_vars['orderby'] = 'date'; $query_vars['order'] = 'ASC'; return $query_vars; } } p2p_register_connection_type(array( 'from' => 'post', 'to' => 'other_post_type', 'box' => 'My_P2P_Box' ));
For whoever is interested.
Oh wait, that actually doesn’t work. NVM.
You’re right, that was tough! ??
I did this, at first glance it seems to work. Is this what you were talking about?
class DGO_P2P_Box extends P2P_Box_Multiple { protected function get_query_vars( $post_id, $page, $search ) { $query_vars = parent::get_query_vars( $post_id, $page, $search ); // We want to only be able to connect posts that have the 'foo' tag. $query_vars['connected_from'] = null; return $query_vars; } }
Do you think it’s a viable option to use your plugin for what I want to achieve? Or would it be a better option to custom code this from scratch?
Does anybody know if this is possible with the Posts 2 Posts plugin? Scribu?
Forum: Fixing WordPress
In reply to: Link to intermediate image size in galleryHi esmi,
What are you trying to say? That the answer can be found on the page you’re linking to? Because it can’t. It’s only possible to specify the size of thumbnails, not the size of the images that are being linked to:
link
you can set it to “file” so each image will link to the image file. The default value links to the attachment’s permalink.