Archive for the ‘WordPress’ Category

Display WordPress Sidebar With single Posts

Saturday, October 24th, 2009
  • display-wordpress-sidebarWordPress 2 Columns

It is really easy to make WordPress display ’sidebar’ too when showing single posts. All you need to do is edit the single.php file in your current theme folder. Just change the content class to ‘narrowcolumn’ and add a call to the ’sidebar’ before the ‘footer’ call.

  1. Go to the theme editor. Appearance/Editor
  2. Click on Theme Files/Templates/Single post (single.php)
  3. Alter the CSS class of the content div to  “narrowcolumn” instead of “widecolumn”
  4. That is, replace:

    <div id="content" class="widecolumn">

    with

    <div id="content" class="narrowcolumn">
  5. Add a line calling get_sidebar() at the end just before the get_footer() call
  6. I.E., add the following line (will show sidebar):

    <?php get_sidebar(); ?>

    before this line:

    <?php get_footer(); ?>
    
  • Show sidebar

Now you know how to display Word-Press sidebar with single posts.

Word Press Permalink Error

Wednesday, October 14th, 2009
  • Word Press Permalink Error

Permalink 404 ErrorThis problem surfaced when I upgraded my blogs to 2.8.4, but only on those blogs that were not in the root folder.

  • Default Settings Worked

The Permalink settings worked fine on default, but broke when set to /%category%/%postname%/.  Adding index.php/%category%/%postname%/ resolved the problem, but would have wrecked all of my my historical search links.

  • Edit the .htaccess File

This old .htaccess file worked perfectly previously:

# BEGIN WordPress

ErrorDocument 404 /index.php?error=404
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .  index.php [L]

# END WordPress

-The solution was to add the blog folder name in to the ReWriteBase and ReWriteRule lines in the .htaccess file

# BEGIN WordPress

ErrorDocument 404 /index.php?error=404
RewriteEngine On
RewriteBase /weblog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .  /weblog/ index.php [L]

# END WordPress

  • Automatic HTACCESS Generation.

WordPress is designed to (re-)generate the htaccess file whenever permalinks are activated in your WP dashboard.  Unfortunately this does not happen on some (my) servers, so I have to manually edit the htaccess file to get rid of the Word Press permalink 404 error

How to Upload Screenshots to WordPress

Thursday, April 2nd, 2009

How to Upload Screenshots to WordPress

How to Upload Screenshots to WordPress or discovering how to add screen shots to WordPress is easy with the FireFox plugin, but if you are like me and want to keep the plugins down to a manageable number, then here is a way to do it using FireFox but without a plugin.

  • Create your Screenshot
  1. Create your Screenshot using Alt/PrtScr [Captures the topmost window].
  2. Open the WordPress post editor and click in a blank space and click Ctr/V [Paste].  Nothing will happen on your screen, but Firefox will create a file called moz-screenshot1.jpg inside your computer.
  3. Next, use the WP ‘Add Media’ dialog to upload a picture

  4. and navigate to C:\Users\YourName\AppData\Local\Temp and select the latest moz-screenshot.jpg image

5.  Edit the Title option and so on and click insert to finish adding a screenshot to your WordPress post.

  • Mozilla FireFox Quirk

This works because you tried to ‘paste’ the screenshot into a Rich-Text Editor[W/Press], which triggers the action of Mozilla storing the screenshot in the User/Username/AppData/Local/Temp folder.  This is easier than opening a photo editing program, pasting in the picture, and then saving it to a folder on your hard drive before you can do your screenshot upload.

  • XP Users

XP Users will probably find the path looks more like C://Documents and Settings/Users/Yourname/Local Settings/Temp

My Starter Blog

Saturday, February 14th, 2009

My Starter Blog

My Starter Blog is a great alternative to WordPress if you need a stripped down version. It is a very lean program and comes without all the clutter of Widgets, Plugins, etc.

  • Update

The original version required you to write your own HTML to style the posts, but the latest release has a built in text editor with style buttons. The Themes are also upgraded. More: V1.6.0 is out!

  • Low Bandwidth

My Starter Blog has no MySql database or other bandwidth and disk storage load, just a few ‘flat’ files that need only one or two hundred kb of space.

  • Simple CMS

This is a Content Management System [CMS] that is really simple to use, and doesn’t need megabytes of program files to run.

  • Ping Google and Pingomatic

The really great thing about it for me is that it has the ‘Ping’ function included so that your new ‘niche’ blog will be instantly found by the search engines.  A conventional website can take months to get into the SERPS, but this blog ‘lookalike’ takes care of that and puts you on a level footing with Wordpress – there is even provision for SEO!

  • Try Before you Buy

There is a free single shot version you can download [MyStarterBlog ] to try it out, and if you like it you can buy it.  The price is only $7.

  • Key Benefits [From steve's Blog]
  • More secure since there is no backend that can be hacked
  • Learn to use FTP software, HTML(posts/pages)
  • Interact directly with your readers
  • Use the 8 included themes that you can modify to your taste or get new ones
  • Search engine friendly out of the box so that your readers can find your blog quickly
  • Auto-generate the RSS feed and sitemap.xml
  • Create unlimited blogs (paid version)
  • Import text files in a batch to start your blog faster (paid version)
  • Import your WordPress blog(XML) (paid version)
  • Free Basic version(1 blog)
  • Low cost paid version available with free upgrades for life
  • No spyware or adware

Get Rid of CommentLuv Flaw Once and For All

Saturday, September 20th, 2008

Get Rid of CommentLuv Flaw Once and For All

I am a dedicated fan of ‘CommentLuv’ in Wordpress blogs, you know, that plug-in that seeks out your last post and hangs a link to it on the end of the ‘Comment’ you are making on a blog: BUT, I really hate those blogs where the apostrophe is missing from the code and your ‘CommentLuv’ link has your name with  two Esses on the end – see red text in example below:

Rhys Your comment is awaiting moderation.

“QUOTE”

Hey Tom!

This post is not just good sense, it is creative sense! Thanks for the heads up on this; if we are not enjoying our blogs, then what the heck ARE we there for?

I blog mainly for the interaction, and you have highlighted the things that create interaction – particularly #2, with your ‘liven it up’ ideas!

:-)
Rhyss last blog post..Hosting from Hell -

  • The Cure:

The blog-owners cure for this is really easy – Open your WPress dashboard at Settings/CommentLuv and add the apostrophe after [name] as in the example below:

Change  [name]s last blog post.. to read  [name]s last blog post..

Then all your  commentators sigs will be correct like this

:-)
Rhys’s last blog post..Hosting from Hell -

  • Get CommentLuv

Maybe Andy Bailey (Fiddyp.co.uk) of Comment Luv could edit his plugin to include the apostrophe as the default – after all, that would be grammatically correct! (What say Andy?)

  • Update

Andy just fixed that with version V2.0b Release 11. It seems that this is not quite a simple problem because some versions of WordPress stall when you add the apostrophe.  The cure is to update your CommentLuv or to put the ascii code instead, I.E.

[name]&#180;s last blog post..

  • Download CommentLuv

If you don’t already have this magic plugin, leap on over to Andy’s site and download it now, set it up, and add the apostrophe when you do the settings, so that you can get rid of CommentLuv Flaw once and for all.

  • Update

Andy has revamped the CommentLuv Plugin and it now has lots of new features, like Click Stats, works on Blogger, etc., and the dreaded “Apostraphe Flaw” is now a thing of the past.

How to Tame IE6 Hover Problem

Sunday, August 31st, 2008

How to Tame IE6 Hover Problem

Suppose you want to make a pop-up tool-tip with CSS and you get it all done, but your tool-tip won’t work in Internet Explorer because of the IE6 Hover Problem. You can solve this with Java Script, but it takes quite a bit of code, and it isn’t really necessary.  There is a way to make IE6 hover work just using CSS and one simple trick.

  • Use Tool-tips ??

Maybe you want to provide an explanation or some other info when the user hovers the mouse over a word in your text like this. You can make a tool tip appear by putting your explanatory text in the ‘title’ field of an anchor.  The problem with that is that you can’t style it, and by default it disappears after 5 seconds.  Useless for long explanations because you don’t get time to read it before it vanishes.

  • Pure CSS Pop-ups

You can have  nicely styled pop-upsYour beautifully styled Tool Tip pop-up window looks like this.You can add code to it (E.G., <p>), style it how you like, and generally stamp your imprint on it to reflect your site or your personality. that fit your theme and are cross browser compatible using just style statements – no Scripts!  Add the following code to your style sheet or style statements in the header:

/* Pop up styles  */

a.ref   {
position: relative;
}
a span   {
border: 1px solid #700;
padding: 4px;
visibility: hidden;
position: absolute;
top: 30px;
left: -20px;
color: #900;
background: #ffd;
width: 250px;
}
a:hover   {
background-color:white; /* Trigger for IE6  */
}
a:hover span, a:active span, a:visited:hover span    {
visibility: visible;
text-decoration: none;
}

  • The Secret

Note this code: a:hover   { background-color:white;  } /* Trigger for IE6  */ Because IE6 will not action a hover call for anything other than the <a> anchor itself, you need to trigger the hover event by calling a straight hover action like this a:hover {something}, then it will read the rest of the hover code and action it.  In this case I have used a <span> to make the tool-tip hover, but you can apply this to  <img>; or whatever…..

  • The Code:

The Page code looks like this:
<a href=”#” class=”ref”>anchor text here<span> Pop-up Text contained in the span statement</span></a>

Hover this to see it work anchor text herePop-up Text contained in the span statement and beat the IE6 Hover Problem once and for all.

  • Tip:

If you are doing this in WordPress, use the ‘HTML’ tab, not the ‘Visual’ Tab for editing it, ’cause WP makes a right ‘Dog’s Breakfast’ of the embedded code if you save it in Visual.

What Everybody Ought to Know About WordPress Backup

Saturday, July 12th, 2008

What Everybody Ought to Know About WordPress Backup

Back up Your PostsI was a bit careless and I lost a whole Blog. AND I DIDN’T HAVE A BACK-UP! Big panic, much self blaming, ‘Oh dear, how sad’, and ‘Now what do I do?’

  • Use Google Cache to Recover Your Data

Panic over when I realized that most of the info was still recorded in the Google Cache, so I IMMEDIATELY did a full search and saved all the pages off G back to my hard drive. This gave me the text of each post, and also the pictures.

  • How to Back Up

So how do you back up your data? It’s really easy – log in to your Admin control panel and click the Manage tab. There is a top menu item called Export, so click that, then click the ‘Download Export File’ button to bring up a dialog where you can choose how to name and save it to your own hard drive.

  • How Did it Happen?

Well this is what you DON’T do! I did an upgrade from 2.5 to 2.5.1. I deleted all the files on the server as instructed, and loaded in the upgrade. I navigated to MyDomain.com/wp-admin/update.php and hit the enter button. And it all turned to custard! The error message came up like: “You already have tables in your database……” So I “Dropped” them. And all my data went slithering down the tube to limbo………….. I had backed up the data from ANOTHER BLOG by mistake, and when I did the “Import Back-up” trick it was all the wrong data. Please feel free to jeer! I think I should be thoroughly jeered at for 10 minutes every morning BEFORE breakfast for a week to reinforce the message of -

  • “Do regular backups!”

So There you go, that is what everybody ought to know about Word Press backup!

Rhys B – "How Do I put My Picture on the Internet"

Wednesday, May 28th, 2008
  • Rhys B’s answer to: “How Do I put My Picture on the Internet”

Rhys B This is an experiment (See Update 6 below) to see if I can resolve the question: “How Do I put My Picture on the Internet?”, so that it shows up with my name for a Google Search?????

See it Here. So what I have done is displayed it here and

Picture of Rhys B
Photo of Rhys B

Used Keyword Coherence and Site Synergy“: to be sure that my name shows up as the first keyword in the Google SERPs, and now you just might discover exactly, “How Do I put My Picture on the Internet?”

UPDATE : OK, so Mr Google spotted this post 43 minutes after I posted it, and it showed No 1 in the SERP’s in a search for the keyphrase, “How Do I put My Picture on the Internet”, but so far the picture hasn’t come up on an image search for Rhys B.

UPDATE 2: 14 days later and still the picture hasn’t come up on an image search for Rhys B. Seems Google images results lag way behind the data searches!

UPDATE 3: 6 Weeks on and still no sign of the Google image crawler. Oh, well; This very informative post from Xarj Blog and Podcast suggests that G is very slow indeed to index images,  like it can take up to a year[See update 6 below].

UPDATE 4: Very discouraging – nearly 6 months on and still no sign of the pic in Google Images. Have added a DIV frame around it with a Title in Bold, to see if that helps!

UPDATE 5: Success!!!! Finally [10 months later] Google has decided to list this pic [Rhys B] in the Image Search. I rate this as a NOT VERY successful experiment!

IMAGE SEO: If you want to do any SEO on your images, then this article is was was the tops. The most important tip for me was that when G uses random text to label an image, it takes it from ABOVE the image. Therefore, be sure to have descriptive text above the image as well as below it.

UPDATE 6: Yeeeeee-haaaaaa! I believe I’ve finally got it sorted.  The trick is this – set the title of the pic, the post title,  the opening BOLD bullet header, and the img title ALL to THE SAME KEYWORD/PHRASE. E.G., “put-my-picture-on-the-internet[.jpg]” Also put the image IMMEDIATELY after the Bullet Header.  The Big G will then  index your picture within 6 weeks.  (This assumes that G is spidering your site regularly). This has been true for the last dozen or so posts I have applied this formula to.

This method assumes that you are able to make a post titled the same as the title you want Google to index the picture under – so the Post might be titled Photo of John/Jane Doe; the bullet head read John/Jane Doe Online; the img title read John/Jane Doe and the pic name be john/jane-doe.jpg