WordPress Expert » HTML http://johnlamansky.com/wordpress Wed, 01 Jun 2011 18:58:49 +0000 en hourly 1 http://wordpress.org/?v=3.3 How to Nofollow a Link http://johnlamansky.com/wordpress/nofollow-link/?utm_source=rss&utm_medium=rss&utm_campaign=nofollow-link http://johnlamansky.com/wordpress/nofollow-link/#comments Wed, 18 Jun 2008 14:00:16 +0000 John Lamansky http://wordpress.jdwebdev.com/?p=61 Adding “nofollow” to links can increase your blog’s rankings by decreasing unnecessary PageRank flow. Here’s how to do it.

First of all, here’s what the HTML code for a link might look like:

<a href="http://wordpress.jdwebdev.com">WordPress Expert</a>

The link, when rendered, would look like this:

WordPress Expert

To add nofollow, you would change it to this:

<a href="http://wordpress.jdwebdev.com" rel="nofollow">WordPress Expert</a>

You may be able to find links to manually nofollow by going to your Theme Editor (under Design) and scanning the sidebar and footer files. You should nofollow links to any page for which you don’t care about the ranking. For example, you may want to nofollow links to your RSS feed, since there isn’t much point in that appearing in a standard web search.

]]>
http://johnlamansky.com/wordpress/nofollow-link/feed/ 17
How to Create Spaced Lists in WordPress Posts http://johnlamansky.com/wordpress/spaced-lists/?utm_source=rss&utm_medium=rss&utm_campaign=spaced-lists http://johnlamansky.com/wordpress/spaced-lists/#comments Mon, 05 May 2008 14:00:33 +0000 John Lamansky http://wordpress.jdwebdev.com/?p=57 Say you have a list like this:

  • Item A
  • Item B
  • Item C

…And you want it to look like this:

  • Item A

  • Item B

  • Item C

When you have lists that contain a lot of text, spacing out the items can improve readability.

As far as I know, this isn’t possible in the visual editor (unless you went the semantically-incorrect route of creating a new <ul> for each list item).

To add spacing, you’ll need to go to the HTML editor. In WordPress 2.5, select the “HTML” tab of the post editor; in previous 2.x versions, select the “Code” tab.

Here is what your list code would look like:

<ul>
<li>Item A</li>
<li>Item B</li>
<li>Item C</li>
</ul>

To create spacing, just add the <p> and </p> tags to the beginning and end of each item like so:

<ul>
<li><p>Item A</p></li>
<li><p>Item B</p></li>
<li><p>Item C</p></li>
</ul>

Then save the post and voilĂ ! Spaced lists.

]]>
http://johnlamansky.com/wordpress/spaced-lists/feed/ 2
Make WordPress and Firefox Adblock Play Nice http://johnlamansky.com/wordpress/firefox-adblock/?utm_source=rss&utm_medium=rss&utm_campaign=firefox-adblock http://johnlamansky.com/wordpress/firefox-adblock/#comments Mon, 10 Mar 2008 19:20:30 +0000 John Lamansky http://wordpress.jdwebdev.com/blog/troubleshooting/firefox-adblock/ This potential problem is applicable to those using the following, which is probably quite a few people:

As part of its functionality, Adblock inserts a Block tab next to Flash objects, etc. to make blocking that object as easy as a couple clicks.

The problem is, Adblock will insert the HTML code for this tab into the visual editor for a WordPress post that includes Flash.

And who wants code like this in their posts?

<a href="http://www.example.com/flash.swf" style="left: 0px ! important; top: 0px ! important" title="Click here to block this object with Adblock Plus" class="abp-objtab-0032072711718704405 visible ontop"></a>

Thankfully, the solution is simple:

  • For Adblock, right-click on the Adblock link in the status bar and select “Whitelist this whole site.”

  • For Adblock Plus, right-click on the ABP icon in the status bar and select “Disable on (your domain name).”

This will stop Adblock from adding the “Block” tab (and its associated code) into your posts.

]]>
http://johnlamansky.com/wordpress/firefox-adblock/feed/ 0
How to Include Code in WordPress Posts http://johnlamansky.com/wordpress/code-in-posts/?utm_source=rss&utm_medium=rss&utm_campaign=code-in-posts http://johnlamansky.com/wordpress/code-in-posts/#comments Thu, 06 Mar 2008 16:00:38 +0000 John Lamansky http://wordpress.jdwebdev.com/blog/tips/code-in-posts/ If you’ve ever tried to insert code into a WordPress post, one of the following has probably happened to you:

  • Your HTML code was rendered as such.
  • WordPress stripped the code from the post entirely.
  • WordPress turned "straight quotes" into “curly quotes” — not good if you want your users copying/pasting code from your blog!

Here’s how to get around these annoying problem and make the code show as-is:

  1. Put the code into a basic text processing program (like Notepad), and perform the following find/replace operations:

    Find Replace
    < &lt;
    > &gt;
    " &quot;
  2. Click the “Code” tab on the WordPress post composition page, and then paste in the “fixed” code.

  3. Be sure to encase your code in a <code> tag for purposes of semantic correctness.

Check out the Writing Code in Your Posts WordPress Codex article for more lengthy take on the issue.

]]>
http://johnlamansky.com/wordpress/code-in-posts/feed/ 1