jamin84
Forum Replies Created
-
Forum: Plugins
In reply to: [WordPress Popular Posts] Create query based on recent comments@kexikus To add on to your great work, I found you can treat it like a regular WordPress Loop if you add the following:
<?php foreach ( $query_posts as $query_post ) : $post = get_post($query_post->id); setup_postdata( $post );?>
And now you can use all the great template tags like
the_title();
andthe_post_thumbnail()
within theforeach
.Cheers!
Forum: Plugins
In reply to: [Plugin: Scissors and Watermark] getting error: cannot update metadataOK so I found a work-around that has yet to fail.
Open scissors-watermark/functions.php and comment out ln1139 – 1155. So this function is no longer used:
// Check if exists files of custom sizes. If not we re-create all sizes including custom sizes. if ( !empty( $_wp_additional_image_sizes ) ) { $custom_sizes = array_keys( $_wp_additional_image_sizes ); if ( in_array( $_POST['target'], $custom_sizes ) ): // TODO: It re-create all sizes. It should to make only the custom size which miss $attachment_metadata = get_post_meta($post->ID, '_wp_attachment_metadata'); $new_metadata = wp_generate_attachment_metadata( $post->ID, $fullfile ); if ( !wp_update_attachment_metadata( $post->ID, $new_metadata ) ): return __('Can not update attachment metadata.', 'scissors'); endif; endif; }
Whatever this was doing was failing, and since disabling it I have been able to use the plugin like expected.
Cheers!
Forum: Plugins
In reply to: [Plugin: Scissors and Watermark] getting error: cannot update metadataTry the “regenerate the thumbnails” button. Worked for me, but doesn’t quite fix the problem.
Forum: Plugins
In reply to: [Plugin: Scissors and Watermark] getting error: cannot update metadataI am getting the same alert too!
Fixed.
I was using Twenty Twelve comments template and they incorrectly setup the $args.
Change
$args = array( 'ID' => $post->ID, 'status' => 'approve', 'order' => 'ASC' );
to
$args = array( 'post_id' => $post->ID, 'status' => 'approve', 'order' => 'ASC' );
Ok, figured out 90% of it.
Open “class_functions.php” in the wp-property folder. Ln 278, change
'supports' => array('title','editor', 'thumbnail'),
to
'supports' => array('title','editor', 'thumbnail', 'comments'),
Then in admin, allow comments on each property page (Discussion section under General Information).
Open your “property.php” file in your theme (or copy the one from the plugin and copy it to your theme folder).
Add
<?php comments_template(); ?>
Where you want your form and comments.
10% problem is I’m getting all the comments, not just the ones for the individual properties. But that should get you started ??
I would also like to find out how to do this.
Forum: Plugins
In reply to: [File Un-Attach] how to make multiple attachments to workI’m in the same boat as everyone that is having trouble getting this to work with 3.5. I’m using WP-Property plugin (which uses the standard WP media gallery) and was only getting the last post to display an image assigned to multiple posts.
I see the author added the code from Sebmeric, but it wasn’t working without manually referencing and even then the format wasn’t useful. I’ve gone through and updated so the format matches that from the media gallery.
$gallery = ($post->gallery)?$post->gallery:$property['gallery']; //get the attachements via Sebmeric's addition $fun = fun_get_attachments( array( 'post_mime_type' => 'image/jpeg' ) ); foreach( $fun as $f){ $i['post_title'] = $f->post_title; $i['post_excerpt'] = $f->post_excerpt; $i['post_content'] = $f->post_content; $i['attachment_id'] = $f->ID; //get the image links for all the sizes foreach (get_intermediate_image_sizes() as $s) { $img = wp_get_attachment_image_src( $f->ID, $s ); $i[$s] = $img[0]; } $m[$f->post_title] = $i; } $gallery = ($m)?$m:$gallery;
Obviously I’d like to avoid a foreach within a foreach, but it works. Hopes this helps ??
Turns out another plugin (SEO friendly images) was overwriting the alt tags.
Forum: Plugins
In reply to: Hide parts of postHi – I’m looking for the same thing, what did you end up using?
Forum: Fixing WordPress
In reply to: (2.9) Random num assigned to cropped image thumbsOK, figured it out.
1. Create a new template output tag (called mine postthumb) in output_tags.php file, from the Post Plugin Library, which is required for Popular posts plugin I’m using.
2. My custom function looks like this
function otf_postthumb ($option_key, $result, $ext) { return get_the_post_thumbnail($result->ID, 'thumbnail' ); }
3. Under Popular Posts settings->output, add your new custom tag. Mine looks like this
<li><a href="{url}">{postthumb} {title}</a></li>
You could also make other custom functions for the different sizes if need be. This way, it doesn’t matter what your thumb image is called on the server, and you can skip using custom fields!
Forum: Installing WordPress
In reply to: Sort Uploads into Different Folders Based on File TypeI am also interested in what people can say about this.
I am interested in the same thing! I am trying to use the thumbs created automatically by WP through custom fields and avoid any extra processing. I have gone the route of Recent Posts with custom image fields and now am having trouble sorting by pageviews rather than by date. Is there a simple way to incorporate a {custom:Thumb} tag with WPP? Thanks!
Forum: Plugins
In reply to: ad management???I like advertising manager.
https://www.ads-software.com/extend/plugins/advertising-manager/
Forum: Fixing WordPress
In reply to: [Plugin: NextGEN Gallery] Post-specific galleries in SidebarThanks for the response! I haven’t looked at the built-in, but I enjoy the flexibility of the nextgen-gallery.
My working solution:
1. added a “postid” column to wp_ngg_gallery to record the relationship (I figure every gallery will have a post associated with it)
2. displayed postid in manage gallery table
(just to show if there is a relationship, 0 means none)
3. added a post edit section under manage gallery->edit
my NextGen Gallery mod exampleLet me know what you think!