jmini
Forum Replies Created
-
Forum: Everything else WordPress
In reply to: Plugin Problems—Not Being Added to the Plugin DirectoryMy bad… The directory is :
http://svn.wp-plugins.org/use-theme-iconset
It is working.Forum: Everything else WordPress
In reply to: Plugin Problems—Not Being Added to the Plugin DirectoryCould you do the same thing for me ?
The plugin page already exists :
http://wordpress.org/extend/plugins/use-theme-iconset/
Status : “Approved: 2008-11-13”But I didn’t manage to connect the svn :
svn: URL 'http://svn.wp-plugins.org/use_theme_iconset' doesn't existForum: Fixing WordPress
In reply to: Attachment.php doesn’t display imageTurns out that the Codex is wrong about the hierarchy, it says that it’s Index.php <- Attachment.php <- … when in reality, Single.php is used before (so the correct hierarchy is Index.php <- Single.php <- Attachment.php <- …).
What appears to me is that:
if you use the single.php template, the medium size image (+ a link to the original image) is shown by the function the_content();
and if you use the attachement.php template it is not.This might be a bug, but it also let you more possibility for the customization of your attachment page.
Here is some code that you should place over the <?php the_content(); ?> line in attachment.php file, in order to have the same display as with the single.php template.
<?php if (wp_attachment_is_image($post->id)) { $att_image = wp_get_attachment_image_src( $post->id, "medium"); ?> <p class="attachment"> <a href="<?php echo wp_get_attachment_url($post->id); ?>" title="<?php the_title(); ?>"> <img src="<?php echo $att_image[0];?>" width="<?php echo $att_image[1];?>" height="<?php echo $att_image[2];?>" class="attachment-medium" alt="<?php $post->post_excerpt; ?>" /> </a> </p> <?php } ?>You can now customize it, by choosing the size of the picture in the wp_get_attachment_image_src() function, or not displaying the link.
http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src
http://codex.wordpress.org/Function_Reference/wp_get_attachment_url