I’ve used the “Press It” bookmarklet about as long as I’ve used WordPress. When the feature was originally used in 1.5.x, a new window would open up, and you could reference the original site for what you wanted to use for content. In 2.0.x, it takes you from the site to your write post panel, which means I either have to go back and re-open the site, or remember what it was I wanted to use from the site. That is until today. I accidently had some text highlighted on a page when I used the bookmarklet, and when taken to the write post page, the highlighted text was pasted into post panel. Cool! Now I can highlight a blurb for a blockquote, then “Press It”, and simply add the blockquote html tags and finish the post.
Miklb's Mindless Ramblings
chronicling life in a digital world
(disclaimer)I’m not a coder, and this is my first attempt, I apologize if this isn’t properly documented or presented.
My very first WordPress Plugin! I’ve dabbled with a lot of areas of WP, but until this post in the support forums, I never really had an idea or need to write one. But after doing some reading, I found that there wasn’t a simple way to accomplish this task. All of WP’s archive features are based on date.
So with the help of alphaoide via #wordpress on IRC, I put together this simple plugin to accomplish the task. It worked fine on my test site, but may need some TLC before being good to go. Basically it outputs categories by name in an h2 tag, then lists post titles with a permalink to the post.
I tested this by creating a Page Template, then inserting the plugin code within the content div of the theme.
The code to insert is
< ?php mb_cat_archive(); ?>
(remove the space between the and ?, I’m not sure why that is getting reformatted in the post)
I suppose this could be used in a sidebar, however it may create a very long list…
So to summarize, download the file, unzip, and upload to your wp-content/plugins directory.
Activate the plugin in the dashboard. Create the page template, inserting the above code, save, and upload to your themes directory.
Go to Write->Page, and choose the template you uploaded.
The new page should now list your categories with their appropriate posts.
I haven’t looked into how it handles posts with multiple categories, that will be on my todo list, I’m sure, if the plugin proves useful or popular. I’d also like to add some AJAX to hide the posts until you click on the category (that would make it much more sidebar friendly), and the ability to change the h2 tag to whatever one likes.
You can download the file via:
http://www.miklb.com/blog/cat_archive.zip
This little tutorial is intended as a means of providing WordPress users the means of posting a thumbnail image on their home page, and having a full size image on the single page view. This is accomplished using the image uploader built into WordPress, and CSS. If you are intending on using excerpts on the home page, then the addition of Kaf’s Excerpt Reloaded plugin. His plugin allows for the inclusion of tags within the excerpt, something the built in function the_excerpt does not.
The first step is to make sure you have the_content or the_excerpt wrapped in a unique div class. I’m not sure of the exact correct semantics, but I simply call my home page excerpt “home”, and single page div “single”. (Note, depending on your theme, you may or may not need to create a separate class for the single page view. I actually wound up not using single in my theme, as I was able to use the class “primary” from the original code. The objective is to have a parent div to call with the specific class we assign the thumbnail).
Next, when you upload your images via the WP upload, be sure to note the path. Generally speaking, both the created thumbnail and full size image are placed in the same directory. the difference being the thumbnail file is yourimage.thumbnail.jpg. So now that you have uploaded the image, and the thumbnail has been created, it’s time to place both the thumbnail and full size image in your post. We are going to code the image directly, and not use the WYSIWYG or quick tag buttons, as we need to add a class directly to the image. Again, not sure about proper semantics, but I used “big” and small, obviously for the full size and thumbnail, respectively. Note, if you want to also float the image, you can use two classes, simply leave a space between each class. An example would look something like this :<img class="left small" src="http://yourblog.com/wp-content/uploads/2006/04/image.thumbnail.jpg alt="image" /><img class="left big" src="http://yourblog/com/wp-content/uploads/2006/04/image.jpg" alt="image" />
Now to create the CSS to hide images on the different pages.
First, to hide the full size image on the main page, we need to add to our style sheet .home .big {display: none}.
Then to hide the thumbnail on the single page view, we add .single .small {display: none}.
That’s it. A couple of simple CSS classes and the built in image upload. A note about the code. Depending on your theme, you may or may not need to create a few more templates. If your theme only has an index.php file, then you’ll need to save a copy of that as single.php then make the changes to that, as outlined.
I’d love some feedback on the semantics of the classes, as that’s still an area I’m learning about, as well as any general feedback about the concept. It works fine for the theme structure I’m using, but if you run into any problems with your theme, please leave a comment, and I’ll do my best to help you make it work.
So, just over a year ago I started blogging. I believe I’ve grown quite a bit in my web knowledge in a short time of actually using a site I’ve started. I tried doing something with just about every free resource out there, it just never “took”. It wasn’t until my friend over at tiny little dots adopted WordPress, and thus I installed it on my newly purchased domain, did the light go on. At once I felt at home. I immediately begin cramming massive amounts of CSS knowledge into my already crowded head. I now can I say I can see myself actually putting food on the table and a roof over my head some day doing this stuff full time. I’ve got a long way to go, and need to particularly see where I “fit in”, but it is quite exciting, a feeling I lost quite some time ago in regards to cooking.
So a hardy thank you to tiny for adopting WP and to trench for my first blogroll link. Also a big thanks to the many people who’ve stopped by and left a comment, it’s always nice to know someones reading the site :)
I’m really looking forward to seeing what the next year of doing this brings, what direction things will go, but if the first was any indication, it’s going to be great.
I had a client who chose the Landzilla theme, but wanted some color changes. While in the process of doing that, I found the theme used a single index file, with no seperate header, sidebar, footer, etc. So I’ve repackaged the theme with the new colors, a few other changes, as well as a .psd file to insert your own 181 x121 pixel images into the four boxes in the header graphic.
A screenshot can be seen here.
Here’s the download.
Any questions, just leave a comment, I’ll try to help.
Oh, the name, well, Florida is really just one big swamp…










