pictures

wordpress


Show One Post/Page in WordPress

hr
hr

If you want to have a content area somewhere on your site that shows content from a post or page - and you want to do this with using the simplest of code (no loop, no query_posts, etc), check out the function get_post. The get_post function allows you to simply get one post’s title, content, category, etc by simply adding a few lines (see the example in the documentation) of code to your site. I have used this on a number of client’s sites as well as recently on my company site for the company profile. Keep it simple!

Quick CSS for WordPress Images (Updated)

hr
hr

A week or so ago, I posted some information on how to quickly style your WordPress images. After recently updating my company's web site (SDAC Inc. - I noticed if you used captions, my custom CSS would not work. Here is some CSS that will work with and without image captions:

CSS:
.alignright, .aligncenter, .alignleft {padding:4px;background:#ecece2;border:1px solid #c7c7bb;}
.alignright {float:right;margin-left:5px;}
.alignleft, .alignnone {float:left;margin-right:5px;}
.aligncenter {display: block;margin-left: auto;margin-right: auto;}

The difference? I used img.align.. which worked if you did not use captions, but if you use caption, there is an outer div class called align... The more generic CSS posted here takes care of both issues.

Quick CSS for WordPress Images

hr
hr

If you install WordPress and use the media uploader to manage your images in your posts - you can easily style your images quickly by adding the following code to your theme's stylesheet.

CSS:
img.alignright, img.aligncenter, img.alignleft {padding:4px;background:#efefef;border-color: #aaa #ccc #ddd #bbb;border-style: solid;border-width: 1px;}
img.alignright {float:right;margin-left:5px;}
img.alignleft, img.alignnone {float:left;margin-right:5px;}
img.aligncenter {display: block;margin-left: auto;margin-right: auto;}

This code will set up your images to float appropriately, as well as give a nice border as seen below.

Christmas in DC

Note* This information is now updated: Updated CSS

Find and Replace With phpMyAdmin (or using SQL)

hr
hr

Ever need to find and replace something in your WordPress database? (perhaps you changed domain names and have the old domain name or folder structure hard coded into some of your posts) You can easily update your database by using phpMyAdmin or by using the following code in any SQL interface:

SQL:
UPDATE wp_posts SET post_content = REPLACE(post_content,"http://olddomain.com/blog","newdomain.com/");

The first part of the command says "update the database table wp_posts" (where your content is stored). The later part of the command says "use the field "post_content" (where all your actual post content is stored" and then find "http://olddomain.com/blog" and replace it with "http://newdomain.com". You can find anything (not limited to domain name) and replace it with anything as well. This is a great time saver!

Jappler Recommends: Lightview Plus WordPress Plugin

hr
hr

I recently switched from using a gallery WordPress plugin called fGallery to something that is more elegant and updated: NextGen Gallery During this transition, I found a really cool lightbox-ish plugin called Lightview Plus which is more polished than your typical lightbox plugin.

Example:

You do not have to add in extra code to get the images to show up in the lightview - it automatically takes care of everything for you.

Post Revision Coming Soon to WordPress!

hr
hr

I subscribe to the WordPress Development Updates Feed and this morning I got a nice morning surprise: "Post revisioning is in trunk". This means you will be soon able to create a post, publish it, make a revision, and then keep the old version as well as the new version so you could compare them at a later date. This is one reason I often push clients to Drupal if this is something they need, but to have this in WordPress - this is great news. Great work guys!

WordPress 2.5 Admin Color Schemes

hr
hr

Thankfully - it is now easy to change the colors in the WordPress Admin. I thought the new color scheme was a bit washed out - but just today they added another option which was much more vibrant. You can choose your Admin color theme by logging in, choosing Users, then selecting the color scheme.

Wordpress 2.5 Beta 1: One Click Plugin Updates!

hr
hr

On my company blog, I blogged about my initial thoughts on WordPress 2.5 beta 1. I have since then updated to WordPress 2.5 beta 1 and have been pretty darn happy with it so far. All my plugins on jappler.com made the upgrade without any issues and this morning when I logged into my web site, I noticed that one of my plugins had been updated since I last logged in and with WordPress 2.5 - you now have the ability to do "one click" installs. You need to provide WordPress with your FTP user name and password, and with that, you can have WordPress manage your plugin updates. No more manual downloading, uploading, etc... Nice work WordPress team! Stay tuned for more WordPress 2.5 related posts.

wordpress thumbnails/podpress fix.

hr
hr

WordPress has a great feature where it will make thumbnails out of any image you upload when creating a post. When you have PodPress installed (a great podcast plugin), the thumbnails option disappears. Finally I got sick of this and found the solution. If you ever run into this - now you know how to fix it as well!

internet explorer and custom 404 pages issues in wordpress.

hr
hr

Has anyone else seen the issue where you have created a 404 (or not) for WordPress and when you show links to posts or pages in WordPress that are marked as private - IE users intermittently get the generic IE 404 page? I cannot figure out how to fix this. Any thoughts would be appreciated! The HTTP header that the page (password protected) produces is a 301.

Basically - I have a custom 404 template that says "if is logged in show "file not found" and then a link to the search form. If you are not logged in, show a login form - as this takes care of the logic 99% of the time. This setup works 100% of the time with Firefox and Safari - but IE barks at it randomly. (If you refresh - you see the correct 404 text within 2-3 refreshes). What is going on?

apache, mysql, php update.

hr
hr

Finally after two years of contemplating the updates to Apache 2.x, MySQL 5.x, and PHP 5.x, I finally updated my server to the latest version os Apache, MySQL, and PHP. I was not too concerned about custom work or any of my WordPress sites, but I was concerned XOOPS and/or XOOPS modules would have some problems, but it is now a week later and everything is running smoothly. Why finally? Well, as of the end of this month, support for PHP 4 will be discontinued. Better late than never. Time to update your servers too?

wordpress mu spam.

hr
hr

I recently finished up migrating a site for a client (WordPress MU) from one host to another. I got an email requesting the migration from someone that said "it was a simple blog with only a few plugins". When I took my initial look, I counted 30 plugins, and a database with 2093 tables (WordPress MU standard install uses 7 tables). When I asked them about the database size, they were just as shocked. Come to find out - they had a ton of "spam blogs". After a few hours of weeding out some of the spam blogs, they were able to get the database size down to 1390 tables - which made it slightly more easy to work with.

The lesson here is - if you are going to use WordPress MU - I would consider requiring approval before a blog is created, or at the very least, monitor the blogs on your site. Of course, I would also highly recommend using Akismet for comment spam as well which will also cut down on the general spam level per blog. Also something to note, before you move your site to ... [more]

jappler.com update 14.8.

hr
hr

After working on clients' web sites all day long, I often realize that this web site could benefit from things I learn while working on other projects. In the past few months I have put together some pretty amazing web sites that really bend WordPress so that the users can do just about any update to any text via the WordPress admin. I also have put together some other pretty advanced sites which rely heavily on template logic and really neat CSS. I had a few moments last night to update this site (cleaned up a lot of the templates, changed the home page, re-arranged the page content for the main pages, put in an archives section, and started thinking about how I could improve this web site to make it more useful for others. If you have any ideas - please let me know! For now - enjoy the changes, and optimized code.

slightly less busy now!

hr
hr

I am always excited to complete a project - as the end of the project is by far the most stressful, but when the project goes live - it makes up for it. The last few months I have been working with a talented group of people at TIME Inc. to create a web site for their senior political analyst Mark Halperin and the site debuted today. The site was exciting to work on and I learned a lot. Now that this is out, hopefully I will be able to post a bit more.

The Page

wordpress update notification to the rescue.

hr
hr

I was working on a project for a client and downloaded a plugin that was advertised to do the exact thing I needed - but when I installed it on my development server (still running 2.2 for this client) the plugin did not work. After spending time trying to figure out what the issue was, I installed it on a generic 2.3 install of WordPress so I could reference it for the plugin author (someone I have worked with to help debug his other plugins). As soon as I installed it - I got the message "a newer version of this plugin is available" and when I installed the newer version, my problems disappeared and everything worked. The update notification is gold and worth the upgrade!

wordpress 2.3 updates: afterthoughts.

hr
hr

I have not updated multiple web sites from WordPress 2.2.x to 2.3 and wanted to share some afterthoughts. I enjoy working with WordPress because of the simplicity of their upgrades.

  • Eight out of ten sites sites I updated so far to 2.3 had no problems whatsoever.
  • The two sites (this one was one of them) that had errors were due to outdated plugins. Once I updated the plugins to the latest versions - everything ran smoothly.
  • None of the themes I had created had any problems and some of them are quite complicated.
  • Out of all the CMSes I have installed and supported, I think WordPress is by far, the easiest to maintain and the least likely to have major problems after the upgrade. I believe this is because of the talented developers and testers behind WordPress. Great work - it is much appreciated!!

If you have not upgraded yet - be sure and check out my post on upgrading WordPress to 2.3 and enjoy the new version!

jappler.com wordpress update.

hr
hr

I wrote a detailed process on how I upgraded and cleaned out jappler.com to go from WordPress 2.2 to WordPress 2.3. If anyone is interested in the process, check out my "Updating from WordPress 2.2 to 2.3" blog post on my company blog.

wordpress podcast.

hr
hr

If you are a WordPress user or developer, check out the WordPress Podcast. I recently started listening to it and it is a great resource for all levels of WordPress users.

retro macos wordpress theme.

hr
hr

I stumbled on this sweet Retro Mac OS WordPress theme and had to pass the link on to others. Rock on!

a new wordpress user.

hr
hr

My cousin asked me last week about what it would take for him to get a web site that could be easily updated and flexible for growth and of course I pointed him towards WordPress.com. I figure he could learn the ropes there and then when he was ready for something a little more, I would create a custom WordPress site for him. Best of luck Robert!


search

subscription information

Blog RSS

Comments RSS



Powered by FeedBlitz

blog categories

blog tags

most popular posts

  1. jappler recommends: room & board (store).
  2. using parallels and windows for web development debugging.
  3. another good first tuesday in november.
  4. remove all .svn directories in a directory.
  5. wordpress newsletter plugin.
  6. Add a "Pseudo" Pseudo Class Hover in Inline CSS.
  7. php live training.
  8. so long, farewell ben!
  9. css containers: one image, fixed width, rounded corners.
  10. feel better soon joe paterno.

blog archive

standards

Get Firefox!
XHTML
CSS