Dec 30 2013

301 Redirect that makes www non-www

OK, I do 301 redirects all the time for clients, when they move or change their site, but what is an easy way to make the redirect from www to non www?

Simple, put this into the .htaccess file of the site in question.  It works.

RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

Thanks to Stackflow for this answer, which according to Google, I keep looking for.


Nov 13 2013

Why can’d I see the admin panel in WordPress?

I often inherit websites, and the one thing I usually use quite a lot, to familiarize myself with the site, is the admin panel in the front end.  That way I can find the pages, that often do not have the same name as their headline, as their menu says.  Especially older sites get this way all the time.

So, when the admin panel does not show up, I go and check everything I can to bring it back.

In a recent site, the one thing I didn’t think to look for was a plugin called “Remove Admin Bar“.  Since, it is built into wordpress to remove the admin bar from your profile, it seem like a superfluous sort of thing to install, but who knows?

So, once I deactivated that solved my problem, at least for that site.

Nov 1 2013

Why won’t my picture show up in Facebook?

Well, I would love to show you pictures about how this is done ,but this is the link to the facebook developers page, where you can check and see how the Facebook is seeing your page, when you get ready to post it on facebook, so you can share it with all your friends.  If you go here, when the image doesn’t show up in facebook, or whatever the problem is, you can get a clue as to what Facebook is having trouble with.  It may not solve all your problems, but it will at least give you a starting place.

I tried an experiment and used it on my about page. I can clearly see my photo, so I k now that if I tried this in facebook, that would not be an issue.

However, other issues, it does not solve, such as why it can’t see a photo that is clearly there.  But at least with this device, you can see that it can’t see it before you even try posting.

Oct 18 2013

Theme, theme, which theme? Canvas still, Canvas 5.51 that is.

My backend programmer hates Canvas.  He uses a theme he wrote from scratch, and if I let him, will use that instead.  But each time that WooThemes updates Canvas I fall in love with it all over again.

They have just updated to 5.51.  I can’t even recall what number I was at when I started, but each time they upgrade, it is a fantastic improvement.  What I like is that no matter what new themes they put out, Canvas can be built into any one of them.  They now have full width sliders, which they had already put on other themes.

And they do listen to feedback, which is quite cool.

Apr 17 2013

Finally full width header in WooThemes Canvas 5.2.2

I went to grab the latest Canvas and noticed it had come out yesterday.  I was pleasantly surprised to go through the settings and come across “full width header”.  (and this includes a full width footer as well)

Finally ,and at last, we can halve our full width header, but not with a boxed layout.  Oh well, I suppose I should be happy that I don’t have go into the code and change the header or footer for functions, or anything.

Now, to get full width headers with the boxed layout.

Thank you Woo, for listening.


Apr 12 2013

Brute force attacks, and why you should never keep admin as a login

This article is about the brute force attack that is going on against wordpress sites, but it points out what I have always said.  Never use “admin” as a login name.  I have used it myself, not to attack, but to help people get back into their account when they have lost access.  If it is an account that I didn’t set up, “admin” will be one of the log-ins, and usually will have their email attached to it.

But yes, this is very serious, and there are lots of way to protect yourself, so go do so now.  Such as limiting login attempts and forcing strong passwords.

Thank you Chris for the heads-up on this.

Mar 17 2013

WordPress Gallery and Border removal

It is so annoying, the automatic insertion of border to the media gallery, with no easy way to remove them.

So, here is the answer:

.gallery img {border:none !important;}

Just that, into your child style sheet. No need to hack, as this post said. It’s a shame, because that is the first thing that comes up when you search. It is actually the second link on google that gives the right answer.

So, why is one right and one wrong, if they both work?  Here is why.  If you upgrade, or your client upgrades, and they don’t know about the hack, it reverts back to what it was before, and considering how often WordPress updates, that is a sure thing.

Remember, always make a child theme, and always make changes there.  You never know what the future holds



Mar 11 2013

Smart and dumb SEO

There are a lot of bad spam out there, as you all k now, and although not the most annoying is the spam you get in the comment section of your blog, it is a bit of a pain.  I got one the other day that read like this:

A person necessarily assist to make significantly posts I’d state. That is the first time I frequented your web page and so far? I surprised with the analysis you made to make this actual put up amazing. Fantastic job!

It was obviously written by someone whose first language was not English, but when I traced the back-link I did not find a cigarette or porn site, but rather a site that was telling you how they could build up your SEO (Search Engine Optimization) with back-links.  Not only that, they were going to charge you $500 a month for the privilege.  They said they got results, and I found, or rather Google found, about 3 million similar if not exact phrases like the one above.  I went to the first few links, and sure enough, the comment section had let the spammer post their comment.  Some were related to SEOs, but others were about things that had nothing to do with their site, such as housing, or recipes.  When I took a look at those back links, they didn’t go back to the SEO site, but probably to their clients.  Nice that they sometimes changed the phrasing.

What can be done about this type of spam?  Just keep them off your website comment list.  I have noticed that if you let one in, then they all swarn there like ants to leftover food.

Feb 12 2013

Setting up multiple sites, without having access to new databases with Backup Buddy

Usually it isn’t a problem to create a clone, when using Backup Buddy, especially if you are using a control panel.  But what if you don’t have a control panel, and what if you are only allowed one database to boot? Welcome to the other way to work, with a certain ISP in the Bay Area.

So, welcome Codex to the rescue, as usual.  In their article on installing multiple blogs, they explain:

By default, WordPress assigns the table prefix wp_ to its MySQL database tables, but this prefix can be anything you choose. By using more than one, you create unique identifiers for each blog in your database. For example, let’s say you have three blogs to set up, with the names Main, Projects and Test. You want to substitute the prefix wp_ for each blog’s wp-config.php:

So, rather than having to do anything with the database itself, the way the ISP told me to do, I just changed what the name of the prefix was, when I was going through the migrate steps in Backupbuddy, and there it was.  Working perfectly.


Feb 11 2013

Woothemes Canvas tip for moving the main menu

What I really need is a note book, and I would print out everything and just refer to it, but it is som uch easier to just have the web.  The problem is things keep getting moved, and one of those things that keeps getting moved is the Canvas tutorials.

I don’t mean the simple stuff, that I know how to do, and remember each time.  It is the fuction stuff, such as moving a menu around:

add_action( 'init', 'woo_custom_move_navigation', 10 );
function woo_custom_move_navigation () {
    // Remove main nav from the woo_header_after hook
    remove_action( 'woo_header_after','woo_nav', 10 );
    // Add main nav to the woo_header_inside hook
    add_action( 'woo_header_inside','woo_nav', 10 );
} // End woo_custom_move_navigation()

#navigation { float: right; width: auto; }

Now, who is going to remember that?  That list line, by the way, goes into the css.  Very important.

And I wouldn’t mind it if I could bookmark the page, and refer back to it, but woo keeps redesigning their site, and so, have put all these basic things away.  Right now it is on this page, but who knows were it will be next week?  So for now, it is here on my blog. :0