Archive

Archive for the ‘Wordpress’ Category

Creating posts and pages in WordPress

March 16th, 2011 No comments

Before creating posts or pages, you should have a high-level understanding of WordPress constructs – particularly posts and pages. This is not complicated stuff but is important. To write a post:

  1. Log in to your WordPress Administration Panel with the user name – http://YourSite/wp-admin/
  2. Click the Posts tab on the left
  3. Click the “Add New” Sub Tab
  4. Fill in the form making sure to include a meaningful title
  5. As needed, select a category, add tags, and make other
    selections from the sections below the post. Each of these
    sections is explained here:

    http://codex.wordpress.org/Writing_Posts

  6. When you are ready, click Publish.

    If you find that you are confused, take a moment to re-read the WordPress constructs page.

    To create pages, you follow roughly the same steps as above except that in step 2 you go to Administration > Pages > Add New tab

Categories: Wordpress Tags:

WordPress constructs

September 12th, 2010 No comments

There are several constructs in WordPress. They are not complicated but understanding them will make things make more sense. The are Pages, Posts, Categories, Tags, Widgits, and Plugins

  • Pages are the the main “permanent” content of the site. Most themes will automatically create buttons or tables for pages.
  • Posts are usually shorter and less important content. Examples might be “Dance this Friday” or “$5 discount through Saturday”. One page is designated as the page where posts will show up. This could be the main site page or something else such as “News”, “Blog”, or “What’s new”. Part of a site’s Google Page Rank is based on how often the site is updated. I like to make posts appear on the front page and create them frequently to keep the site fresh, current, and interesting.
  • Category is an attribute attached to a page or post. Depending on the theme, categories may automatically show up somewhere as a navigational aid – though most themes use Pages as the main navigational construct. Your site should have a relatively small number of Categories. Most themes key off of pages for navigation but a few key off of the category of the page or post – so navigation will quickly become unwieldy if you have too many categories. This link will show you all the posts on this site with the category “WordPress”
  • Tags are similar to Categories but more specific and are an aid for searching. So what’s the difference between a Category and a Tag?. If you had a news site, the a category might be Local, or National, and a news story in National might have tags like Obama or Scott Brown or health care.
  • Widgets are pre-canned thingies that might appear as a text sidebar, calendar, recent posts, archives, etc.
  • Plugins are essentially small programs that you extend the functionality of WordPress. For instance, you might have a plugin that gives you a guestbook, or shopping cart. There are thousands of plugins.
Categories: Wordpress Tags: , , ,

WordPress – adding links

September 12th, 2010 No comments

Once you become comfortable with basic HTML, you can type the link directly in the HTML editor. A link is created using the anchor tag and looks like this:
<a href=”http://google.com”>Click here to search&lt/a>
Click here to search.

Adding a link in WordPress:
From the Visual editor

  1. Edit the page and select the “Visual” tab in the top right of the of the edit window
  2. Enter the text that you want to go with the link. This could be the actual web address but more often it is the text that goes with the link – such as: “Click here to search” in the google example above.
  3. Highlight the text and click on the link icon – it looks like sideways figure eight. A box will pop up. Enter the address in the “Link URL” box. The “Target” entry will define if the link opens up in a tab/window or the current tab/window. “Title” is the text tha will popup up when the user puts their mouse over the link. “Class” defines the look and feel of the link based on the current theme options. Link URL is the only mandatory field. Click on “Insert” when done.

From the Visual editor

    1. Edit the page and select the “HTML” tab in the top right of the of the edit window
    2. Enter the text that the user will click on. Again, this can be the web address or something like “Click here to blah blah”.
    3. Highlight the text with your mouse and click on the link button above the edit area. Click OK.
Categories: Wordpress Tags:

Thumbnail bug in Arras theme

February 26th, 2010 No comments

I’ve been playing around the with Arras WordPress theme version 1.3.6 – which I really like. You can apply an attribute of thumb with a value of an image URL. This will show an image in post preview on the main page – very nice. The layout has a configuration for showing/not showing post thumbnails in the actual posts. The config didn’t have any effect – clicking on the post showed the thumbnail regardless. I added this code to ThemeDir/library/filters.php starting at line 113:

 /* mjb mbelange */
if ( arras_get_option('single_thumbs') == '1' ) {
  $postheader .= '<div class="entry-photo"><img title="' . get_the_title() . \
   '" src="' . arras_get_thumbnail($w, $h) . '" alt="' . get_the_title() . '" /></div>';
}

After pouring through the PHP code, finding the bug and fixing it, of course I found this fix on the Arras forum. Oh well. Nothing like rolling your own to better understand the code.

Categories: Wordpress Tags: