WordPress theme goes wider and bigger

I’m excited to announce another wave of updates for my dedicated photography blog! This time, there’s actually 2 updates to the theme.

Photo caption fix

photo.hugolim.com

First of all, it’s about a bug fix which is actually quite unnoticeable to the masses. There are 4 columns at the bottom of the homepage whereby 2 latest photos shown. The description of the photo has been made to be the same as what is displayed in the photo slide show / stream above. Primarily, we do not want to see “Click on the photo to see larger size” appears in the caption at the homepage which is ridiculously irrelevant, isn’t it? It’s only valid when user goes into the blog entry.

Expand blog entry

photo.hugolim.com » Blog Archive » Panoramic Bayan Lepas_1256538526283

Secondly, it’s about serving better and wider range of photos.

Everything has gone wide these days seriously. You want wide wide highway to drive on to getting real big and wide screen display to play your HD videos. Heck, you can’t even buy a proper normal ratio (4:3 ratio with resolution like 1024×768, 800×600, 1280×1024) LCD panel on market as easily as 2 years ago now! Everything is wide, so do the photos and blogs. Okay, back to where we were.

For our case here, in particular, panorama. It’s a pain to the eyes when we are viewing something very wide like panorama like the scale of 5:1 (width:height). Just like the little long panoramic image that you are seeing above!

With just a click of button! Walah~

photo.hugolim.com » Blog Archive » Panoramic Bayan Lepas

The blog entry content pane is widened to as much as the template permits. This has made photo viewing much much much more flexible and satisfying. Hope you all like this little update.

Technically, of course, for those who are interested to get wide too on their blog too, read on.

Read More

Geopress to Geotag data migration

Just in case you decided to try other location tagging plug-in for your WordPress today.

I have developed a fairly simple data migration script so that you won’t need to go through the pain of re-adding latitude and longitude for the new plug-in in all your posts.

Essentially, you will need a bit knowledge on how to access your database administration. Typically, you will be using phpmyadmin to manage your WordPress database.

phpmyadmin

Here is how we do it.

  • Go to your phpmyadmin
  • Select your WordPress’s database, by default, it has a suffix/prefix of ‘WP’
  • Click on the SQL tab
  • Then, execute the following queries below.

Run this for its latitude…

insert into wp_postmeta (post_id,meta_key,meta_value) (select p.post_id, ‘_geotag_lat’, format(left(g.coord,instr(g.coord,’ ‘)-1), 5) lat from wp_postmeta p join wp_geopress g on p.meta_value = g.geopress_id where p.meta_key = ‘_geopress_id’);

And, run this query to retrieve the longitude…

insert into wp_postmeta (post_id,meta_key,meta_value) (select p.post_id, ‘_geotag_lon’ , format(right(g.coord,length(g.coord) – instr(g.coord,’ ‘)),5) lon from wp_postmeta p join wp_geopress g on p.meta_value = g.geopress_id where p.meta_key = ‘_geopress_id’);

I have migrated mine successfully. Hope it helps for you too!

Read More

Blogspot to self-hosted WordPress migration

WordPress nowadays is equipped with Import feature that lets you import posts from range of popular blogging sites such as Blogspot. Here, I’m providing some answers you may be seeking for.

As the title suggests, I will be focusing on Blogspot to WordPress posts migration only.

WordPress import feature just stops and does not seem to work

OK, you have done all the authorization at google, returned to your own WordPress admin page, you see list of blogs you got from blogspot and some numbers showing how many posts or comments you got there for each blog as well. You press the magic button, import and nothing actually happen.

It is something that has to do with your hosting provider. Let’s cut the hassle of talking to your hosting.

Way of going around this problem is:-

Blogger to WordPress at WordPress.com

  1. Get a account at WordPress.com if you do not have one.
  2. Do the same ritual process again. Manage -> Import -> Blogger -> Authorize -> Grant Access -> Import
  3. If step 2 fails, just try again, it should go through.
  4. If you managed to import from blogger to wordpress, we are now halfway to success already!

WordPress at WordPress.com to your own hosted WordPress!

  1. OK, go to manage -> export. Generate the XML file.
  2. At your own hosted wordpress, go to manage -> import -> wordpress. Upload the file you got from step 1 and let it rolling!
  3. You are done!

Note: The import feature at step 2 does have file size limitation constraint set by your hosting company. Typically, 2MB. If you find your XML file larger than that, read on.

WordPress XML size overlimit.

One way is to increase the upload limit in php.ini but you won’t have access to that file at server side. If you do, read this.

If you don’t, read on.

  1. Open up the XML file generated with your preferred text editor. Look for line start with the tag <item> and </item>. Each of the these set represent one blog post. <item> marks the start and </item> marks the end.
  2. Remove as much sets as needed until you reach the desirable file size. Beware, do not remove any other kind of coding/data in there.
  3. Import the file into your wordpress. WordPress -> Manage -> Import -> WordPress
  4. Remember what you have removed just now!
  5. Repeat step 1-2-3 again, you should be able to catch what’s happening here by now. This time, you will remove what you have included at the first upload, continue with what you have not uploaded. Repeat these steps as needed.

Appendix / Reference / Resources / Links:

http://wolfshowl.com/2008/07/12/xml-file-too-big-to-import/

http://codex.wordpress.org/FAQ_Working_with_WordPress#WXR_filetoo_large_to_import.3F

http://mu.wordpress.org/forums/topic.php?id=4591

http://wordpress.org/support/topic/200104?replies=5

http://wordpress.org/support/topic/172108

http://www.techcounter.com/wordpress/import-blogger-beta-posts-to-wordpress/

http://underscorebleach.net/jotsheet/2006/05/move-blogger-to-wordpress

http://labnol.blogspot.com/2007/05/move-your-blogs-from-blogger-to.html

Read More

WordPress stats missing

My WordPress stats in my dashboard have gone idle not receiving hits for months. This has happened ever since I upgrade my wordpress to version 2.5 and above.

The solution is extremely easy. Just put

<?php wp_footer(); ?>

at somewhere in the end of your footer.php file. Just to make sure you get the picture right, you can put it just before the </body> tag.

<?php wp_footer(); ?>

</body>
</html>

Credit/ Reference: I got my head up here

Read More