Posts Tagged ‘WORDPRESS’

Social Media Widget – Getting Your Custom Icons to Work

Saturday, May 12th, 2012

Social Media Widget, created by Brian, has to be one of the coolest widgets out there to handle all your social network connections.  It comes with lots of features out of the box but it is dynamic enough to allow end users to easily customize on their own.

As I was creating one of my websites, I wanted to leverage this widget but customize the icons to better fit my design.  But alas, I was not able to make it work initially. Upon further research (I got it to work), it was nothing more than correctly identifying the path to the icon folder!

Because there are so many variations involving hosting providers, WordPress installation methods, etc., it can get downright confusing.

Since Brian has done an excellent job of describing what needs to be done, I am simply going to outline minor tweaks I made to get my customized icons to work.

ENVIRONMENT

Host:  Hostgator Hatchling (limited to one domain assigned to the hosting package)

WordPress:  v.3.3.1

Framework:  StudioPress Genesis 1.8.1

Theme:  Magazine Child Theme, v2

Widget:  Social-Media-Widget-2.9.4

Icons:  Gray, 32px, created with Adobe CS5 Fireworks

INSTRUCTIONS

  1. Log into Hostgator cpanel
  2. Navigate to WP-CONTENT, then create a folder called “icons”
  3. Copy files into this “icons” folder (as instructed by Brian, naming convention MUST BE IDENTICAL to his existing icon names.  Let’s use facebook.png as an example.  First, match the file name including lower letters. Second, make sure it ends in .png file fomat. Third, you can ONLY use 16px, 32px or 64px sizes.  Other sizes will not work.   Whatever size you decide, it should be standard across different icons)
  4. Install widget as instructed
  5. From the WP dashboard, click on APPEARANCE–>WIDGETS, then drag over the Social Media Widget to your target destination (in my case, the primary side bar after SEARCH widget)
  6. For my website, I made the following changes:
    • Title:  Connect with Us
    • Icon Size: 32px
    • Icon Pack:  Custom Icons
    • Added my profile URL links for Facebook, Twitter, Linked In, and RSS.
  7. For the CUSTOMS ICON URL,  the default (sample) value was: http://wwww.yoursite.com/wordpress/wp-content/your-icons (another example Brian gave was: http://www.yoursite.com/blog/wp-conent/icons)  In my case with Hostgator, the formatting was slightly different:  http://wwww.yoursite.com/wp-content/icons
  8. For the CUSTOM ICONS PATH, the default (sample) value was: /path/to/your-icons I changed this to: /home/your-cpanel-user-id/public_html/wp-content/icons
  9. At this point, all my custom buttons showed up in my page.

When in doubt, contact your hosting provider for the exact path.  Hostgator online chat technician was awesome.  Good luck.

RESOURCES:

Hostgator – Server Path, Absolute Path

How to Create Drop Caps in Genesis and Thesis

Friday, May 11th, 2012

How To Create Drop Caps - Sample Text
Drop cap is simple enlarging the first letter of a body of text to draw readers attention. It is a very popular effect used in magazines and newspapers as well as online content because it is attractive and effective.

OVERVIEW

There are many different ways of accomplishing this task but the most effective way I found was through the use of a CSS stylesheet.

You may be aware that CSS stylesheet is allows design information to be stored in one location to make it easier to make broad changes (i.e. font size, font type, color, etc.)

So I started looking around and there were some very good suggestions (see below in the resource section), but I just could not make any of them to work in my particular situation so I decided to outline how I did it.  Hope it will work for you as well 😉

REQUIREMENT

  • WordPress.ORG v.3.3.1 or higher (this article applies to self-hosted wordpress.ORG, NOT wordpress.COM)
  • Genesis Framework v.1.8.1 or higher
  • Genesis Child theme – any version

STEP-BY-STEP INSTRUCTIONS

In general, I do NOT like installing WordPress plugins for two reasons:

  1. Security – WordPress gets updated quite often to address security issues; I find that most plugins are not maintained often (free ones anyway)
  2. Performance – there is an inverse relationship between the number of installed plugins vs. web server performance.  More plugins force a web server to work harder, meaning your site may run slow (not good in terms of user experience)

So here is how I used CSS declarations to utilize dropcaps:

Step 1 – I use Hostgator so I logged in, then opened up a file manager

Step 2 – Navigated to where the style.css was located within the magazine child theme folder;

Step 3 – Opened it for editing

Step 4 – opened another Firefox window and downloaded Eka Kurniawan’s plugin (see below for the link)

Step 5 – Open the dropcap-shortcode.php in your text editor and copy the highlighted text

How to Create Drop Caps Style CSS code(here is the actual code)

span.dropcap {

display: inline;

float: left;

margin: 0;

padding: .25em .08em 0 0;

#padding: 0.25em 0.08em 0.2em 0.00em;/* override for Microsoft Internet Explorer browsers*/

_padding: 0.25em 0.08em 0.4em 0.00em; /* override for IE browsers 6.0 and older */

font-size: 3.2em;

line-height: .4em;

text-transform: capitalize;

color: #c30;

font-family: Georgia, Times New Romans, Trebuchet MS, Lucida Grande;

}

Step 6 – Switching to the FF window containing the Genesis – Magazine STYLE.CSS, past the code to the end;

Step 7 – Go to you page or post and simply use <span class=”dropcode”> </span> HTML tags to make your first letter a drop cap.  That’s it!

LAST WORDS

  • backup your style.css before making any changes; that way, you can revert to your backup if your new changes are no good;
  • If you have existing (and lots of) posts and pages, you can try using the automated route as outlined in the Binaryturf.com article.  Unfortunately, this did not work for me because each of my post/page contained an image at the top

RESOURCES

Greg Rikaby – http://gregrickaby.com/2011/04/how-to-create-drop-caps-in-thesis-and-genesis.html
Binary Turf – http://www.binaryturf.com/code-auto-dropcap-thesis-wordpress-themes/
Eka Kurniawan – http://wordpress.org/extend/plugins/drop-cap-shortcode/

Hostgator and WordPress IO

Friday, March 25th, 2011

So, I purchased an hatchling plan with the intention of running a single wordpress installation on it.

Due to the nature of the website (lots of PDF documents), my total file size mushroomed to over 170 meg in just 4 weeks and I was averaging 10gb in monthly traffic.

Then bam!  One day, I tried to upload a 1.2 meg PDF and got an “IO error” message in the WordPress media page.  Curious, I changed to a broswer upload but then it the server timed out.

To make the long story short, I did the following without success:

  1. Uninstalled and re-installed Adobe Flash and associated plugins
  2. Tried using a different browser (after clearing cookies, etc.)
  3. I tried to upload from a virtual environment (running Ubuntu)\
  4. I tried uploading images using cpanel and Filezilla

Strange thing was that I was able to upload smaller (~300 kb) file sizes in various formats without any issues.  Hostgator kept on blaming my broadband provider (FIOS), so I gave in and spent a couple of hours troubleshooting with a Verizon tech.

No surprise, there was nothing wrong with my connection (speedtest.net results were fine) because I was able to upload the same 1.2 meg PDF to another hosting provider running virtually identical WordPress theme.  And there was no speed cap put on my account either.

Another round and going back and forth with HG tech support, and they finally acknowledged that lots of packets were being dropped by their server!

My last tech moved my WordPress database to another server and magically, the problem disappeared.

I guess there really is no free lunch (i.e. unlimited bandwidth and disk space for $10 bucks a month)!