Learn Wordpress Archives

Adding Fonts Into WordPress and Flexsqueeze

Here’s a topic that I found a bit hard to figure out because there seems to be quite a bit of confusion around adding custom fonts into WordPress. To Complicate things, I use the paid theme called Flexsqueeze 1.5. It’s an excellent theme that allows a ton of flexibility on creating the look and feel for a site.

I was working on a project recently and needed to add in a custom font based upon a true type font and I had to figure this dog out. I’d had tried many times to do this but for once and all, I’ve figured it out. Hopefully, this will help you too. (Well at the very least when I’ve got to do this again in a year, I can look back on my own post!)

Remember, this is working in the framework of Flexsqueeze within WordPress.

First, I take the fonts that I want to webify. Sometimes the font files are very large and if they are you must use a program to minimize the amount of glyphs in the font file. On Windows, the program I used was called FontForge. Now, it’s a quirky program and will at times hang on you. So, expect it.

For this example, I’m not going to worry about having a heavy font and the fonts I want to convert will work with the site we will be using to webify our fonts.

The site is Font Squirrel. It’s a free service that you can find at: http://www.fontsquirrel.com/tools/webfont-generator.

We will load our fonts (up to three per build). In this example, I’m just adding one font that is in the .oft format. It could be a .ttf font too, without issue.

font squirrel

Once you create the font, your browser should automatically download it.

Now, I like to add one font at a time if I have more then three. I find it easier to keep track of things going forward if I do that.

Next, unzip the file and give the directory a meaningful name to you. I like to rename fonts to more meaningful names, simply for ease of use. For example, the font I’m using here, Univers LT Std 47 Cn Tl Bold, to me will translate to UniverCondBold. Too easy.

Within the directory created by the zip we download, will have it’s own stylesheet.css. Here’s where we make a small fix for our ease. I’m going to change the cryptic font-family name to something I can remember.

stylesheet_change

So now, I have a font called ‘univers_cond_bold’ that I can use later in my design.

Next, we will take these font files and add them to our WordPress theme. In my case, it’s Flexsqueeze.

Within the flexsqueeze folder, /wp-content/themes/flexsqueeze150/ I will create a new directory containing my fonts called ‘fonts’. Now I can hear the WordPress purists screaming – ‘Don’t install customization into changeable and upgradeable areas of WordPress!’. Well you are right, but I’ve not found a better way to do this. Fortunately, themes like Flexsqueeze are very stable and upgrades are few and far between. So yes, keep notes on this theme customization so you know how to fix it on an update.

theme_directory

So you can see that I’ve loaded four new fonts into this theme. Now I have to tell the theme that they are there for our usage.

With most themes, you would insert the following line into the style.css file in the theme:

@import “fonts/univers_cond_bold/stylesheet.css”; (considering we are doing one font – you’d do one line for each font family you install.)

But with flexsqueeze, you cannot put it into the style.css file because Flexsqueeze creates a completely new css file whenever you change the configuration! So, where do we put it? With a bit of research, I discovered the file that generates the styesheet file. There’s another file called ‘style.php’ that is also in the root folder of the theme.

Look for the section of the file that looks like this and add in your @import statement. For example, here’s another site I did in the example below:

style_php_change

You’ll see that I added in the import pointing directly to the add-in style sheet. In our case, this statement would have read: @import “fonts/univers_cond_bold/stylesheet.css”;

Voila! We can now call our specialty font family from WordPress. You can select text, and give it the font-family of ‘univers_cond_bold’!

And all should work 100%!

 

 

WordPress, TinyMCE and Automatic Tagging

I thought that I’d take just a moment to talk about the nature of WordPress when it comes to auto-tagging posts and pages. If you’ve used WordPress for any time, you’ll have some idea of what I’m talking about BUT you may not know how deep this rabbit hole goes.

Let me give you a bit of history first hand. I do a ton of customized sales page coding in WordPress and the nirvana for me is to turn off any auto-tagging in posts what so ever. It can make coding a sales page in HTML for WordPress a real pain if WordPress decides to insert <p></p> or < br /> tags at the most inopportune times.

When you build a post, and if you take a quick peek at the HTML code in a post, you’ll notice a definite lack of these tags, but you will see spaces between paragraphs.

Take a look at this post when I was building it…

Visual Mode

HTML Mode

So as you can see, no p or br tags, but if you look at the post in the web page, you’ll notice that there are p and br tags inserted.

This is part of the mystifying function built into WordPress called ‘wpautop’. As you can see it stands for ‘wp’ WordPress, ‘auto’, ‘p’. (For more info refer to the WordPress reference page.)

This function handles the heavy lifting of inserting this tags to reduce the complexity in the editor of WordPress. Now, this is great for a majority of WordPress users, but the moment you try to do anything that is off the beaten path, you are immediately in trouble. WordPress will nicely insert these tags where it sees fit. And that can really mess things up.

Now, there’s a ton of plugins that will simply disable this functionality completely. In reality, this situation isn’t very good either. If WordPress doesn’t insert these tags automatically when there isn’t any between paragraphs, you non-customized posts can look pretty bad. But a fellow by the name of Simon has come up with a nifty fix!

You see, if you can keep the <p> tag functionality while turning off the <br> insert functionality, it can go a long way to fixing a lot of problems! Simon has created a plugin to do exactly that. You can see more about it here: http://www.simonbattersby.com/blog/plugin-to-stop-wordpress-adding-br-tags/

To be honest, this is one nifty plugin. I’ve tested it with custom made sales pages in WordPress and it work marvelous!

So you can have your cake and eat it too! Allow WordPress to insert <p> tags when it thinks I needs to but don’t insert <br> tags.

Oh and don’t use the functionality supplied by the plugin TinyMCE Advanced or other that will auto insert these tags for you. It will make a mess of your custom HTML code in a heartbeat.

Do yourself a huge favor and leave this setting that I’m pointing to UNCHECKED!

The only last hurdle is to find a way to insert custom css code onto the page too. But ahhh, that’s another story for another day.

 

Dealing With wp-cron.php Problems

I never thought I’d say it but sometimes success can bite. I ran many WordPress blogs as time goes on you get better and better at writing blogs that will attract more and more traffic. Though, time though in the not so distant future we’ll find that your success on bringing people to your blog will drive you bananas.

With the latest version of WordPress 3.0 and possibly before hand the usage of the automated tasking within WordPress occurs with a file called wp-cron.php. The concept basically is that every time somebody comes to visit your website this particular file is run to ensure that any tasks that need to be completed will get completed on your blog.

These tasks can include posting schedule posts, pinging those posts than just maintenance tasks that WordPress runs to stay fast and efficient. But once you start getting inaccessible for 100 people per day to a blog you do find that this task runs way too often.

And as you can guess it doesn’t take long to get to 100 people per day. Fortunately for us there’s been some very smart people who figure to way around the problem and fortune the problem is very easy to solve. If you’re not techy minded you might find this little carry but trust me, it is actually not that bad if you understand what is actually happening in the background.

Disabling the Default Running of wp-cron.php

First things first, we have tell WordPress not to run wp-cron.php every time somebody comes to the blog. Fortunately for us it’s a matter of adding one simple line into the wp-config.php file that sits at the root of your WordPress installation. That line is: define(’DISABLE_WP_CRON’, true); .

With this line does is it tells WordPress to disable the automated running of that file.

Next we have to tell our hosting agent to run this file for us. I’ve been a little bit of reading around the Internet it seems that running this fall once every two hours seems to be a good number of times to run it. You can decide to run this last per day if you not updating your posts that often. On most my more successful blogs I find that I’m updating posts once every four or five hours so running every two hours is definitely didn’t cover any of my needs that could occur for the posts.

Now I always recommend that you use a hosting agent that uses a program called cpanel. This makes making really hairy changes within your hosting relatively simple. But there’s a lot of things you can do that are wrong when you’re sending a Cron job. By the way, the expression Craun job is the UNIX way of saying performing a task at designated times.

Telling wp-cron.php To Run Manually

All you have to do is follow the pictures that I’ve created below to help you set up a Cron job. Once again this is for cPanel uses only.

After you’ve logged into your cPanel account you will want to look down the page and to define an icon that looks much like the one pictured here called “Cron jobs”. Simply click on this icon to get into the interface.

Now very quickly look at the next diagram. You see that one command has to read ‘X’ beside it. When setting the settings for a Cron job it’s very easy to select the run once every minute instead of the ones on the hour once in a five minutes after the hour or whatever. If you select once every minute and then you will tell the Cron job to run every single minute of every day and every hour. You get the point, this is a very bad thing.

So basically you select your minutes, hours, day, month, weekday and fill in the command to call the actual wp-cron.php file. Once again take a look at the picture below to give you a bit of a roadmap on what you want to see in each of these fields.

Now you look at the command you’ll notice that it is a bit of a hairy looking thing but basically it’s good to point directly to the wp-cron.php file for your particular WordPress installation. Now you must ensure that you select the correct directory structure, including the cPanel username and if you have your WordPress in an add-on domain it will be within a subdirectory.

If you do get confused by this don’t be afraid to get in contact with your hosting agent and asked them to help you create the command properly. Most hosting agents are more than glad to help you fix this problem. Once you’ve done all of this congratulations you’ve now went from an automated Cron job happening in WordPress every few minutes when that only happens once every two hours. This should satisfy the most stickiest hosting agent on the planet.

As you can see the command that you’ll be entering is ‘php -q /home/cpanelusername/public_html/wp-cron.php’. Note that your command could look different depending on the installation.

I hope that this is helped you reduce the amount of computer and memory usage that you are using on your hosting agent at this time.

WordPress is Your Friend

When considering a web site, definitely give WordPress a try. There is tons to be gained from it. But there are pitfalls you should know about it too.

Let’s just take a moment to analyze what you should watch out for before looking at what makes WordPress a great choice.

First, WordPress is a complex system to run a web site upon. This sophistication comes at a price. WordPress is much more hackable then a static web site. Fortunately, protecting your administration directories in WordPress can protect you against about 95% of all hacks.

Next, there is a lot of ways to setup WordPress. What plugins should you use? What theme is the right theme? What’s a theme? Oh boy. But these are things you need to consider before using WordPress.

Personally, it took me about two years of use to really get a hang of successful WordPress installs. This included well over 300 site installs and fixing dozens of other people’s installs in the process.

Think of WordPress as the Mustang of web sites. Press the pedal too hard and you will find over 300 hp of raw power crashing you into another car.

What’s the good of WordPress. If you know how to properly drive this powerful web site engine, it can be a very potent ally to your quest to get ranked by the search engines.

Personally, I find that I can dominate a niche over time for many keyword phrases with very little outside backlinking.

If you are incline to learn WordPress and you are willing to establish many web sites with WordPress, then you can definitely do very well with WordPress, generating a secondary income.

In my opinion this can be accomplished very quickly with very little expense on your behalf. This investment into your future, learning how to flex WordPress, can pay you back very well indeed.

Learning WordPress doesn’t have to be too hard. It is a complex system, but stick to it and over time, you’ll find that you too can become a WordPress expert!

This is something that I’ve resisted for some time, simply because I felt that it didn’t work well. As a proof in point, I recently had to fix a customer’s website that had caching issues.

But going through the fix made me think, should I be relooking at this option within WordPress? I do have some sites that are seeing some serious traffic and I’d like to make sure that I’m ahead of the curve instead of behind!

Let me first explain caching 101.

WordPress Caching 101

 WordPress is actually a very complex framework of calls and procedures that composes a fixed web page to the web surfer when it is requested.

Before the web surfer arrives on the scene to see your page, the web page is composed as some web programming code, a bit of html code and finally data settings that are sitting in a database.

You can aliken it to a baker who has all the ingredients to make a cake ready for the soon to arrive customer. Once the customer arrives and places his or her order, the baker quickly whips together the cake mix, bakes it lightning fast and serves it to the customer ready to go.

Now, you and I both know that preparing a cake takes time. So the smart baker wakes up extra early to bake all the goods he believes he’ll need for the day beforehand.

Truly that only makes sense. Now the baker can satisfy the customer order, literally in seconds.

When you use WordPress Caching, it’s much the same idea. The caching plugin will premake the web pages for the prospective web server and when they arrive to your site, the page is already prepared, thus just needs to be presented to the surfer.

Sounds pretty logical so far, right?

WordPress Cache – Fly In The Ointment

There always has to be a fly in the ointment, of course. WordPress caching is no exception.

Let’s think on the baker example for a moment. Let’s say the baker wants to have the cake 100% ready for the customer. But in reality the baker gets stuck at some point.

Is the cake going to be a birthday cake for some name Sam, Sue or Jim? He just doesn’t know?

So, the baker will still have the customer waiting for the final preparations, like filling out the writing on the to be purchased cake. He just cannot guess what the cake must say.

The same occurs with WordPress. For example, if someone wants to leave a comment, then the caching program must then tear down the ‘cached page’ and replace it with new content.

Now, this isn’t a biggie, but for some other features and functions, caching can cause ruin to the website.

So, where do I sit on caching?

I’m still not sure, just yet. WordPress has matured significantly since I last looked at caching and this site is currently working with caching in place, so we will see. I don’t know if I’d roll it out to an e-store operated by WordPress just yet.

If you to are not sure, the better option, in my opinion, is to get better hosting. Caching has it’s place but it cannot fix slow or poor web server hosting. Making sure that you have enough time on the server you are renting time on is probably the #1 fix you should investigate first.

What do you think about WordPress caching? Please tell me with your comments below.

WordPress Bootcamp – Finally Open!

After tons of work (and still a bit more to do), WordPress Bootcamp 101 is open to the public!

It currently consists of almost 5 hours of video instruction and close to 70 lessons. It’s a course that is designed not to only show you how to set up a blog, but to fully understand all the functionality available to you within WordPress.

Aren’t There 50 Other WordPress Courses Out There Already?

Yes there are. But I wanted this one to be different. I wanted the information to be ‘complete’. I’ve done probably 40 of those other 50 courses and was always still looking for more information.

I can’t say that WordPress Bootcamp 101 is the definitive guide to WordPress, but it does cover 95% of what is important to the average user.

I Don’t Want Know How To Or Want To Learn How To Program!

Great! I hear that. This course has minimum code shown. Only in important, want learn areas, do I delve a little bit into the code. But all unnecessary, if you wish.

Can I Make Money With This Course?

Yes and Yes! The first yes is  because I start the course showing different ideas and sites that I’ve created with WordPress. I’m currently gleaning an easy income from these sites and as time marches on it only gets better and better!

On the second yes, I will be soon permitting affiliate sales to this course. Again, I believe that it’s a great course and an affiliate has the ability to make up to 40% of the cost of the course.

Will It Be Kept Up To Date?

Absolutely. I want it to reflect changes that could occur to WordPress. It is currently written to version 2.9.x, but I also know that version 3.x is just around the corner.

What Will I know Once I’m Done WordPress Bootcamp 101?

You will have a firm grounding of the essentials to WordPress. Plus I’ve encluded special sections showing techniques that WordPress owners could encounter.

For example, how to install a site. How to move a site. What are the best plugins? What if I’m hacked?

Plus, you’ll know the difference between differen things in WordPress. For example, how to make WordPress come across more as a corporate or static site with a blog section is covered.

Click Here for more information on WordPress Bootcamp 101

Hackers, Crackers and Script Kiddies

hack wordpressI’m pretty good at keeping my web real estate safe from criminals but every once in a while someone finds a way to get in still.

Yesterday, I discovered about 20 of my WordPress web sites were compromised by an aspiring hacker. He or she may think it’s great fun and think that they have a right to hack web sites, but to me they are criminals.

They are no different to someone who skulks into your house at night to steal your jewelry. They hid behind the covers of the Internet, looking for someone to deface.

But in the end, the joke is on them. If you want to protect yourself from this sort of criminal intent, I have a few great suggestions for you.

First, take the time to get to know your hosting company’s plan of backup for your web sites. Make sure they are running a good backup plan and also ensure you know how to use it to recover your sites quickly.

My recommendation is to align yourself who offers Cpanel hosting as well as a backup product within their Cpanel called R1Soft Restore Backups. This backup system is very good and very simple to use.

You will normally find that a hacker will compromise all of the web sites that you host on a single Cpanel install, so you can perform a full cpanel recovery of the site using R1Soft. Again, consult with your local web hosting provider.

If you are looking for a good hosting provider, here’s one that I recommend, Scala Hosting. I’ve been with these folks now for about a year and I’ve had stellar service from them. And their backup system is very good and as I describe here.

Next, to stop hackers from hacking your site, make sure you have updated all of your WordPress plugins and your core WordPress install to the latest version.

I have my set to the latest, but was still cracked. It looked like the hacker either used a brute force admin password guessing and/or a password reset hack to cause my admin password to be compromised.

So, the second thing I recommend you do is create a new admin user, giving them full admin access with a complex password, then delete the admin user.

This form of attack is immediately nullified.

Finally, one final thing you can do is use the power of .htaccess files to limit access to your wp-admin folder on your WordPress install to your local IP address. This is getting a little complex for the average web master or internet marketer, but if you want as much protection as possible, you need to perform this step to.

If you are interested in form of protect and be forewarned you can lock yourself out of your sites, you can look to many great web sites, like Blog Security. The author’s posting is two years old, but still very relevant.

Keep your WordPress sites safe from hacker, crackers and script kiddies. No matter what their name, they are criminals. They want to rob you of your web sites and the earnings that you could be making with them.

Take the time to take security seriously. Fixing 200 web sites or even just one can be painful if you don’t plan for this problem in advanced.

Learn WordPress

Taking the time to learn WordPress can benefit you substantually. Let me tell you my journey with its trials on learning wordpress.

I started with this open source software back in April 2008. So, not too long ago. I’m not a software developer but I do have a keen interest in computers, so many you could call that an advantage.

Anyhow, I looked at content management systems, as I didn’t want to reinvent the wheel from scratch each and every time I wanted to setup a website. And I intended to light up many of them.

I wanted something that ran the basics pretty much for me. Things like site framework, menuing and easy content insersion. That’s about it. It was at a time when I knew very little about search engine optimization, and the such.

So, I started with other blog and content management systems and eventually settled upon the task to learn wordpress. Why? It was probably one of the most popular at the time. The other package I did look at was Joomla. But at that time, there was a split between coders with Joomla and the future was just a tad uncertain.

So, that was another factor that drove me to WordPress. Soon, I found that WordPress was very liked by Google, so that was kind of the nail in the coffin, so to speak, for me to settle upon WordPress.

Now, to learn wordpress, it is going to be a bit of a time effort. Yes, you can hire others to do the whole setup, but only you will do the very best job. My recommendation is to take the time to learn wordpress as you build wordpress sites, and eventually farm out these jobs to your exact specifications.

Nice thing too, is that there is a lot of automation tools to do automated installs and final settings. I only use automated tools now.

I’m going to be reflecting back on courses that I took when I started to learn wordpress and see if I can get the rights to them and find a way to get them to you, the reader. Reason why is if you go to wordpress.org, you will be confused.

I was very confused about wordpress.org. Unfortunately, they’ve been using WordPress way too long and there is very little in the way of hand holding for the newbie.

Next, it’s worth your while to look into getting an older license of Photoshop. Yes, yes, you can use other graphics packages, but you’ll find ten times more free tutorials on photoshop then you ever will on any other graphics package.

Photoshop is a bit of a leap in the beginning, but you can learn it too.

So have I made you nervous yet? Don’t be. It really is all possible. If graphics work is not your passion at all, getting this hired out to others is relatively easy. And in the beginning, your sites don’t have to look extremely polished. 

I’ve looked back on my original sites and wow, are they ugly! But they do bring in a bit of cash each and every month. I’ve actually taken some of my original sites that were not very good looking and given them a facelift. With WordPress, it’s easy.

Also, keep your daytime job while you learn these new skills. Your skill set could take a year or two to develop to the point where you will be doing well on the Internet. I’m currently recommending several great products in my review section and soon I’ll be releasing my own video product that ties up a lot of the loose ends.

This way, a newbie can really excel very quickly!

So, don’t let WordPress get you down. All journeys start with the first step, then the next step and the next. But you do get there. Be patient with yourself and make sure you enjoy your time when you decide to learn wordpress!