Advertisement
Guest User

Untitled

a guest
Feb 12th, 2011
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. Breaking Out of Wu Wei
  2. October 6, 10 //
  3. 0
  4.  
  5. Wu Wei isn't some notorious prison in Shanghai it's a free WordPress theme by Jeff Ngan. It's beautiful, clean and did I mention it's free?
  6. You're soaking in it now.
  7.  
  8. The only problem comes when you want to break out of the tight content column for something like a picture or code. Never fear Jeff thought we might so provided a means to allow us to do exactly that.
  9.  
  10. It's fairly easy to do, if a little too tightly coupled for me.
  11. Here's what you do:
  12. Instructions
  13.  
  14. You'll want to modify your image to be 580 pixels or 700 pixels wide for optimal scaling and to cut down on your bandwidth. If you use the 580 pixel size you'll be using "pull-1" while "pull-2" is for images 700 pixels wide.
  15.  
  16. Insert your photo as you normally would into your post.
  17.  
  18. Switch to HTML view from Visual if not already there (the tabs above the post editor).
  19.  
  20. You'll want to look for your image in your post so you know what to edit. You should see something like:
  21. <img src="http://yourwebsite.com/wp-content/uploads/2010/10/05/yourimagefile.jpg">
  22.  
  23. More than likely that image tag will be wrapped by one or two other tags: a comment tag and/or an anchor tag. You're going to put the "pull-1" or "pull-2" class name inside the outer most tag.
  24.  
  25. For my example I'm going to use a beautiful photo of a bridge in Poland by Łukasz Drewniak. I'm also going to use the pull-2 class because I want as large an image size as will work within the theme's grid.
  26.  
  27. Here's what my original image HTML looks like:
  28. [caption id="attachment_882" align="alignnone" width="700"
  29. caption="Kotlaski Bridge - Krakow, Poland"]
  30. <a href="http://picklepumpers.com/wordpress/wp-content/
  31. uploads/2010/10/Kotlarski_bridge_700.jpg">
  32. <img src="http://picklepumpers.com/wordpress/wp-content/
  33. uploads/2010/10/Kotlarski_bridge_700.jpg"
  34. width="700" height="447" class="size-full wp-image-882" />
  35. </a>[/caption]
  36.  
  37. Don't freak out if that looks like gobbledygook to you. It might look like a whole lot of nonsense if you're unfamilier with HTML so I'll simplify it and show you exactly what to do for each case and I'll highlighted the changes so you can better see them.
  38.  
  39. All you have to do is insert the bold text into your image HTML in the appropriate place like so:
  40.  
  41. With a caption:
  42. [caption id="attachment_882" align="alignnone pull-2" width="700"
  43. caption="Kotlaski Bridge - Krakow, Poland"]
  44. <a href="http://picklepumpers.com/wordpress/wp-content/
  45. uploads/2010/10/Kotlarski_bridge_700.jpg">
  46. <img src="http://picklepumpers.com/wordpress/wp-content/
  47. uploads/2010/10/Kotlarski_bridge_700.jpg"
  48. width="700" height="447" class="size-full wp-image-882" />
  49. </a>[/caption]
  50.  
  51. Without a caption:
  52. <a href="http://picklepumpers.com/wordpress/wp-content/
  53. uploads/2010/10/Kotlarski_bridge_700.jpg" class="pull-2">
  54. <img src="http://picklepumpers.com/wordpress/wp-content/
  55. uploads/2010/10/Kotlarski_bridge_700.jpg" width="700"
  56. height="447" class="alignnone size-full wp-image-882" /></a>
  57.  
  58. And finally just the image itself:
  59. <img src="http://picklepumpers.com/wordpress/wp-content/uploads
  60. /2010/10/Kotlarski_bridge_700.jpg" width="700" height="447"
  61. class="alignnone size-full wp-image-882 pull-2" />
  62.  
  63. When you're all done you'll have a nicely centered image that's broken out of the main frame like so:
  64.  
  65. Kotlaski Bridge - Krakow, Poland.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement