Lightly Seared On The Reality Grill

Random expat geekery from The Low Countries

Browsing Posts tagged Wordpress

Housekeeping

No comments

Much as I liked the Ghostwriter theme, it really did struggle to handle inline images properly and after a couple of months of intending to have a crack at the CSS, I have finally admitted to myself that I don’t have the time. So I have gone back to the Arjuna-X theme that I was using when I started this blog.

In other news, I have deactivated the Google +1 plugin. It was messing with my layout.

flattr this!

I installed the Ghostwriter theme about a week ago and, this evening, found a moment to tinker around with it a bit. Not much has changed, but I am quite pleased with the all new 404 page.

flattr this!

After a bit of browsing in the WordPress Themes Directory, I have pretty much settled on the Ghostwriter theme from Bruno Cavalcante.

In it’s unmodified form, the theme is both simple and gorgeous. I may tinker around with it a little at some point but I have to admit that I’m not in a massive hurry to do so right now.

flattr this!

Themes

No comments

Just a short post to let you know that I’m playing around with Worfdpress themes at the moment, There is a lot to explore and I am still interested in seeing if I can knock together something that more closely relects my own preferences.

I’m using the default theme for now, but this will probably change – frequently – over the next few weeks.

flattr this!

I’ve just installed the Comment Reply Notification WordPress plugin and am about to have a play around with it. So I’m not really about to start talking to myself in the comments, I’m testing.

Honest.

Updated

The Comment Reply Notification plugin appears to be a bit broken, so now I am looking at the Subscribe to Comments plugin.

And yes, I have deleted some of the test comments

flattr this!

Often, when I start looking for a WordPress plugin to achieve something I find that the functionality I need – or much of it – is already included in the core code. The WordPress Gallery is a case in point.

So here’s the requirement: I want to add several pictures to a post, automatically formatted into a thumbnails gallery allowing visitors to click on the thumbnails to see the full size images. This can be achieved with no additional functionality at all. All you need to do is upload the pictures into an existing post using the Add An Image button.

The point to remember here is that, when you upload each image, you do not want to Insert Into Post. Use the Save All Changes button instead. This will add the image to your gallery – you can see the image count rise at the to of the Add an Image Window.

As soon as you have added two or more pictures, WordPress will start displaying Gallery Settings every time you upload an image. These settings are reasonably self-explanatory. If, once all your images are uploaded, you click on the Insert Gallery button you will see the following shortcode in your post:

[gallery]

And the result looks like this:

There are several options you can use, described here, and by default clicking on an image will take you to the permalink page for that image – essentially the full sized image but surrounded with the styling used across your blog.

You can, however, go a stage further and add a Lightbox. The one I have found to work most nicely is the jQuery Lightbox For Native Galleries which has a demo-page here. This displays the images in a pop-up without leaving the post and… It’s just a bit prettier.

flattr this!

A month after deciding to merge all of the sections of Pulpmovies onto a single platform, the deed is done. Much of it went pretty well although I did encounter some glitches along the way.

The parts of the process that relied on WordPress functionality (exporting the blogs and importing them into the new site) went remarkably well and, by reorganising the categories beforehand I had very little to do once everything was merged.

It did take significantly longer than expected for two reasons. Firstly, I hadn’t fully taken account of the sheer number of files that needed to be deleted. More significant, however, was that my hosting provider enforces a maximum upload size of 8MB which I could find no way around. Since several of the exported blogs came in at a lot bigger than this, I had to chop them up in order to upload them. Cutting the files down to size wasn’t difficult, but Gedit was probably not the best tool to use in this instance.

One thing I did notice, however, is that the exported files include all comments – including those marked as spam. This undoubtedly is what sent some of the file sizes through the roof and, if I was ever to try something like this again, I think it would probably be wise to delete all the spam comments from the blog before exporting it.

But that’s for the future.

I went with an off-the-peg theme in the end although I have started tinkering with it and will need to make some more changes before I am completely happy. But for now, I shall have some dinner and treat myself to a well deserved beer.

flattr this!

With WordPress, merging blogs is easy but things get a little more interesting if you only want to merge a selection of categories from the old blog with the new. Here’s a way to do it.

First of all, you need to create a temporary user in WordPress to which the posts can be assigned. You can use whatever name you like, but the name I used was xfer.

Then we need to start hacking the database with whatever your preferred SQL client happens to be. The table prefix in the scripts below is wp_ yours may be different.

-- Script 1
-- Identify the ID for the xfer user
-- Make a note of this, you'll need it later.
SELECT *
FROM wp_users
WHERE user_login = 'xfer';

-- Script 2
-- Identify your categories to be assigned.
-- For each of the categories you want to assign, make a note of the term_id
select * from wp_terms;

-- Script 3
-- Sanity check. This script will list the posts that you are about to reassign
-- You don't need to run it...
-- but I like to know what I'm about to change before I make the change
-- The (60, 42, 44, 36, 63) is the list of term_ids for the categories to reassign,
-- from Script 2
select *
from wp_terms a
join wp_term_taxonomy b on a.term_id=b.term_id
join wp_term_relationships c on b.term_taxonomy_id=c.term_taxonomy_id
join wp_posts d on c.object_id=d.ID
where a.term_id in (60, 42, 44, 36, 63)
and post_status='publish';

-- Script 4
-- Change the author for the posts in the selected categories
-- The 86 is the ID for the xfer user.
-- Use whatever value you retrieved from Script 1
-- The (60, 42, 44, 36, 63) is the list of term_ids for the categories to reassign,
-- from Script 2
update wp_posts
set post_author=86
where ID in
(select c.object_id
from wp_terms a
join wp_term_taxonomy b on a.term_id=b.term_id
join wp_term_relationships c on b.term_taxonomy_id=c.term_taxonomy_id
where a.term_id in (60, 42, 44, 36, 63))
and post_status='publish';

Once this is done, you can go back into WordPress and export just the posts assigned to user xfer.

flattr this!

Themes

No comments

Yes, I am playing around with WordPress themes again. None is ideal – as yet – but the process is giving me a fair bit of food for thought.

flattr this!

I mentioned earlier that I was planning to merge the various blogs that make up the current Pulpmovies site and, as a first step and test of the process, I have now merged the (semi-hidden) personal blog from that site with this one. Successfully.

It turns out to be a remarkably easy process although there are a couple of steps that I took to make things easier.

Firstly, before I did anything, I recategorised the posts from the old blog so that they matched the structure of the new one. This seems to have worked and has saved me much tinkering in the new blog.

Secondly, the photos. I downloaded these to a local folder and then uploaded them to the new site, retaining ther folder structure. Which leads me to…

Thirdly, I used a find and replace on the export file to change the src attribute on the img tags so that all of the tags pointed to the correct place.

I still need to do a bit of tinkering but, as far as the essentials are concerned, everything is here and in place.

Now I just need to repeat the process for the rest of the site. Fun, fun, fun.

flattr this!