Showing posts with label blogging. Show all posts
Showing posts with label blogging. Show all posts

Thursday, March 28, 2013

How to make a blog website



First we need to download WordPress from WordPress.com You can upload through a FTP, or log into your host dashboard and install WordPress using the already provided WordPress download. Since we do not want to ReDesign our existing website and only add a blog page we will simply install WordPress in the subroot directory on your server. If you wish to go fully dynamic install in the root directory.

Once installed you will then login to your dashboard. Example of Login is (url wp-admin) The wp-admin must always appear in order to log in. Now since we are not Re-Designing the site and just adding a blog page it would look like this to log in. (url/blog/wp-admin)
Now that you have a blog and have logged in WordPress site, it’s time for your site to start taking shape. I have listed these in order. This must be done this way or you will never get your site to appear properly.
  • Add Pages first, decide what you will name them and click on the page tab on the fly out menu to your left.
  • Add Menu, to get to the menu you will need to locate the appearance tab on the left. The first thing you need to is name the menu. Header Menu,Footer Menu and Sidebar Menu. Now look to the lower left and you will see you pages. Select all pages and hit apply. If you want sub page drop downs simply drag the new page menu over a notch to the right under the appropriate name.
  • Change Permalinks is important, you will find this under the Settings tab. Click on permalinks. Most people name them %postname% this renames your pages from numbers to the name of the page you included in the menu.
  • Install Jetpack.is a great feature to add to a web design. Once connected by clicking on the menu tab called Jetpack you will see many useful choices. My favorite is the Stats. This feature is free and allows you to see what visitor came to your site when, and best of all what key words they used to find you.
  • Add plug-ins and once installed you will add widgets to your site. An easy way to think of this is that each plug in is a widget. My favorite is Ultimate SEO. So for sake of keeping with this web design article type in Ultimate SEO. Once you see it in the list click on install. Once installed Click on Activate.

Thursday, March 21, 2013

Introduction to WordPress Terminology

WordPress was conceived by the developers as weblogging or blogging programs. A blog, as defined in the Codex Glossary, is an online periodical, diary, or successive, released by a person or assembly of persons. numerous blogs are personal in nature, mirroring the attitudes and concerns of the proprietor. But, blogs are now important devices in the world of report, business, politics, and amusement.

Blogs are a form of a Content Management System (CMS) which Wikipedia calls "a system utilised to organize and facilitate collaborative content creation." Both blogs and Content Management Systems can present the function of a website (site for short). A website can be considered of as a collection of articles and information about a exact subject, service, or product, which may not be a individual reflection of the owner. More lately, as the role of WordPress has expanded, WordPress developers have started using the more general term site, in location of blog.

Terminology associated to Content
The period Word in WordPress mentions to the phrases utilised to compose posts. mails are the principal component (or content) of a blog. The posts are the writings, compositions, considerations, discourses, musings, and, yes, the rantings of the blog's owner and visitor authors. mails, in most cases, are the cause a blog exists; without mails, there is no blog!

To facilitate the mail writing method, WordPress provides a full featured authoring tool with modules that can be moved, via drag-and-drop, to fit the needs of all authors. The Dashboard QuickPress module makes it easy to rapidly compose and release a mail. There's no excuse for not composing.

Integral to a blog are the images, images, sounds, and videos, else know as newspapers. newspapers enhances, and gives life to a blog's content. WordPress presents an easy to use procedure of injecting newspapers exactly into mails, and a method to upload newspapers that can be subsequent attached to mails, and a Media supervisor to organise those various Media.

An significant part of the posting method is the act of assigning those mails to categories. Each mail in WordPress is filed under one or more classes. classes can be hierarchical in environment, where one class actions as a parent to some child, or offspring, classes. Thoughtful categorization permits posts of alike content to be grouped, thereby aiding viewers in the navigation, and use of a site. In supplement to classes, periods or keywords called tags can be allotted to each mail. Tags act as another navigation device, but are not hierarchical in environment. Both classes and tags are part of a system called taxonomies. If classes and tags are not sufficient, users can also conceive made-to-order taxonomies that allow more exact identification of mails or sheets or made-to-order post kinds.

In turn, mail classes and tags are two of the components of what's called post meta facts and figures. mail meta data refers to the data affiliated with each mail and includes the author's name and the designated day posted as well as the mail categories. mail meta facts and figures also mentions to Custom areas where you assign specific phrases, or keys, that can recount mails. But, you can't mention post meta data without considering the period meta.

usually, meta means "information about"; in WordPress, meta usually refers to administrative-type data. So, in addition to post meta facts and figures, Meta is the HTML tag used to describe and characterise a world wide world wide web sheet to the out-of-doors world, like meta tag keywords for seek engines. furthermore, numerous WordPress-based sites offer a Meta section, generally discovered in the sidebar, with links to login or list at that location. And, don't forget Meta Rules: The rules characterising the general protocol to follow in utilising this Codex, or Meta, as in the MediaWiki namespace that refers to administrative purposes within Codex. That's a allotment of Meta!

After a mail is made public, a blog's readers will respond, by remarks, to that mail, and in turn, authors will answer. Comments endow the connection method, that give-and-take, between scribe and book reader. remarks are the life-blood of most blogs.

Finally, WordPress furthermore boasts two other content administration tools called sheets and made-to-order mail types. sheets often present static information, such as "About Me", or "Contact Us", Pages. Typically "timeless" in nature, Pages should not be bewildered with the time-oriented objects called posts. Interestingly, a sheet is permitted to be commented upon, but a sheet will not be categorized. A made-to-order mail kind mentions to a kind of organised data that is distinct from a mail or a sheet. Custom post kinds permit users to effortlessly conceive and manage such things as portfolios, tasks, video libraries, podcasts, extracts, chats, and anything a user or developer can envisage.
 
Terminology associated to Design
The flexibility of WordPress is clear-cut when discussing terminology associated to the design of a WordPress blog. At the centre of WordPress, developers conceived a programming structure entitled The Loop to handle the processing of mails. The Loop is the critical PHP program code used to brandish posts. Anyone liking to enhance and customize WordPress will need to understand the mechanics of The Loop.

Along with The Loop, WordPress developers have created Template Tags which are a assembly of PHP purposes that can be invoked by designers to present an activity or display exact information. It is the Template Tags that form the cornerstone of the Template documents. Templates (files) comprise the programming parts, such as Template Tags, that command the structure and flow of a WordPress location. These documents draw information from your WordPress MySQL database and develop the HTML code which is dispatched to the web browser. A Template Hierarchy, in essence the order of processing, dictates how Templates control nearly all facets of the output, encompassing Headers, Sidebars, and Archives. Archives are a dynamically developed list of mails, and are typically grouped by designated day, class, tag, or author.

Templates and Template Tags are two of the parts utilised in the composition of a WordPress topic. A topic is the overall design of a site and embraces color, graphics, and text. A Theme is occasionally called the skin. With the recent improvement in WordPress, Theme Development is a warm topic. WordPress-site proprietors have accessible a long list of topics to choose from in concluding what to present to their sites' viewers. In detail, with the use of a topic Switcher Revisited Plugin, WordPress designers can permit their tourists to select their own Theme.

As the capabilities of WordPress have advanced, developers have added devices that permit users to easily organise a site's gaze and functionality:
  • Widgets provide an very simple way to add little programs, such as the current climate, to a sidebar.
  • Meal lists make it easy to characterise the navigation buttons that are normally present near the peak of a site's pages.
  • The backdrop tool allows the client to change the background image and hue of a location.
  • The Header device gives the client command of the images brandished at the top of a site's various sheets.
  • Formats allow the client to control the display of a exact mail (i.e. display this post as an apart or as a quote or as a gallery). The WordPress Twenty Twelve topic is an excellent example of a topic that benefits these devices.

And speaking of the WordPress Twenty Twelve topic, developers and users are boosted to discover that theme in minutia. The WordPress Twenty Twelve topic, evolved by the WordPress community, demonstrates the use of devices such as meal lists and Widgets, presents examples of recommended topic cipher methods, and emphasizes the use of the Child topic notion to shield a theme from getting overwritten during a WordPress update.

Plugins are made-to-order purposes created to extend the centre functionality of WordPress. The WordPress developers have maximized flexibility and minimized code bloat by permitting out-of-doors developers the opening to conceive their own useful add-on characteristics. As evidenced by the Plugin book or directions, there's a Plugin to enhance virtually every aspect of WordPress. A Plugin administration tool makes it exceedingly easy to find and install Plugins.

Terminology for the manager
Another set of periods to analyze are those involving the Administration of a WordPress site. A comprehensive set of management Panels endows users to effortlessly administer and supervise their blog. A WordPress administrator has a number of powers which encompass requiring a tourist to list in alignment to take part in the blog, who can conceive new mails, whether remarks can be left, and if documents can be uploaded to the blog. An manager furthermore characterises connections and the associated connection Categories which are an significant part of a blog's connection to the out-of-doors world.

Some of the major administrative responsibilities of a WordPress blog engage supplementing, deleting, and managing listed Users. Administering users means commanding functions and Capabilities, or permissions. functions control what functions a listed client can present as those functions can range from just being able to login at a blog to accomplishing the role manager.

Another chief anxiety for the blog administrator is commentary Moderation. commentarys, also called considerations, are answers to mails left for the mail scribe by the tourist and represent an important part of "the give and take" of a blog. But remarks should be patrolled for Spam and other malicious aims. The WordPress management remarks SubPanel simplifies that method with easy-to-use partitions which add, change, and delete remarks.

And not to be disregarded is the obligation for an manager to hold their WordPress present to insure that the newest features, bugs, and security repairs are in effect. To accomodate administrators, WordPress has a simple improvement Tool to download and establish the lastest type of WordPress. There's no apologise to not improvement!
 
The Terminology of Help
The final set of jargon connects to assisting you with WordPress. First and foremost is the suspending Help tab that is brandished under each of the Administration SubPanels. That framework help describes the function and use of the current SubPanel and provides connections to other help topics. And, there are other help assets available to WordPress users; Getting More Help, Finding WordPress Help, Troubleshooting, and WordPress FAQ (frequently inquired inquiries) are good starting points. furthermore Getting begun with WordPress will jump-start readers into the world of WordPress and the very good WordPress courses provide in-depth tutorials on numerous of the facets of utilising WordPress. Among the most significant resources is the WordPress Support Forum where knowing volunteers response your questions and help solve any problems associated to WordPress. And, of course, this Codex which is topped up with hundreds of items designed to make your WordPress experience a achievement!

History of the WordPress Name
in addition to the technical terminology of WordPress, it's also intriguing to understand the annals of the title, WordPress. The name "WordPress" was initially coined by Christine Selleck (see associated post) in response to developer Matthew Mullenweg's yearn to aide his new programs task with printing presses. In this sense, press refers to the world of reporters, reporters, columnists, and photographers. An aptly chosen title, because WordPress serves as the publishing press that endows its users to release their words.

Monday, March 18, 2013

How to create a simple WordPress theme

To start construction your theme, first conceive a sub-folder in the wp-content/themes book or directions in your WordPress folder. For the purpose of this tutorial, we will call the folder "tutorial_theme". The title of the folder should correspond to the title of the theme you desire to conceive. To do this you can use either your very popular FTP client or the File supervisor device in your cPanel.

Before you start conceiving the theme, you should conclude how the layout of your website will gaze like. In this tutorial we will construct a WordPress topic that comprise of a header, sidebar, content locality and a footer ,as shown below:

To do this we will have to create the following files into the tutorial_theme directory:
  • header.php - This file will contain the code for the header section of the theme;
  • index.php - This is the main file for the theme. It will contain the code for the Main Area and will specify where the other files will be included;
  • sidebar.php - This file will contain the information about the sidebar;
  • footer.php - This file will handle your footer;
  • style.css - This file will handle the styling of your new theme; 
You can either create those documents locally with a simple text editor(like notepad for demonstration) and upload them via FTP or you can use the document Manager device in your cPanel to conceive the documents directly on your hosting account.

Now let's take a nearer gaze at each file and what it should comprise:
The header.php document

In this document you should add the following code: 

The header.php file

<html>
<head>
<title>Tutorial theme</title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
</head>
<body>
  <div id="wrapper">
    <div id="header">
      <h1>HEADER</h1>
    </div>

Fundamentally, this is easy HTML cipher with a lone line encompassing a php cipher and a benchmark WordPress function. In this document you can specify your meta tags such as the title of your website, meta recount and the keywords for your sheet.

Right after the title the line we add <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"> tells WordPress to load the style.css file. It will handle the styling of your website. The <?php bloginfo('stylesheet_url'); ?> part of the line is a WordPress function that actually loads the stylesheet file.

Next, we have supplemented the beginning of a "div" with class wrapper which will be the main container of the website. We have set class for it so we can change it via the style.css document.

After that we have supplemented a easy label HEADER covered in a "div" with class "header" which will be subsequent specified in the stylesheet file.

The index.php file

<?php get_header(); ?>
   
<div id="main">
  <div id="content">
    <h1>Main Area</h1>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h1><?php the_title(); ?></h1>
    <h4>Posted on <?php the_time('F jS, Y') ?></h4>
    <p><?php the_content(__('(more...)')); ?></p>
    <hr>
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
  </div>

  <?php get_sidebar(); ?>

  </div>

<div id="delimiter"></div>

<?php get_footer(); ?>


The code in this file begins with <?php get_header(); ?> which will include the header.php file and the code in it in the main page. It uses an internal WordPress function to do this. We will explain this in details later in this tutorial. Then we have placed a Main Area text to indicate which section of your theme is displayed in this area.
The next few lines consist of a PHP code and standard WordPress functions. This code checks whether you have posts in your blog created through the WordPress administrative area and displays them.
Next, we include the sidebar.php file with this line - <?php get_sidebar(); ?>. In this file you can display your post categories, archives etc.
After this line, we insert an empty "div" that will separate the Main Area and the Sidebar from the footer.
Finally, we add one last line - <?php get_footer(); ?> which will include the footer.php file in your page.

 The sidebar.php file

<div id="sidebar">
  <h2 class="sidebartitle"><?php _e('Categories'); ?></h2>
  <ul class="list-cat">
    <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
  </ul>
 
  <h2 class="sidebartitle"><?php _e('Archives'); ?></h2>
    <ul class="list-archives">
      <?php wp_get_archives('type=monthly'); ?>
    </ul>
</div>


In this file we use internal WordPress functions to display the Categories and Archives of posts. The WordPress function returns them as list items, therefore we have wrapped the actual functions in unsorted lists (the <ul> tags).

The footer.php file

<div id="footer">
  <h1>FOOTER</h1>
</div>

</div>

</body>
</html>


Add the following lines to the style.css file:
body {
    text-align: center;
}

#wrapper {
    display: block;
    border: 1px #a2a2a2 solid;
    width:90%;
    margin:0px auto;
}

#header {
    border: 2px #a2a2a2 solid;
}

#content {
    width: 75%;
    border: 2px #a2a2a2 solid;
    float: left;
}

#sidebar {
    width: 23%;
    border: 2px #a2a2a2 solid;
    float: right;
}

#delimiter {
    clear: both;
}

#footer {
    border: 2px #a2a2a2 solid;
}

.title {
    font-size: 11pt;
    font-family: verdana;
    font-weight: bold;
}



Tutorial theme

How to install a Wordpress theme

In the default WordPress setting up, there are a twosome of topics you can select from. You can find the topics in your WordPress administration locality > Appearance > Themes.

You can change the topic easily by clicking on the desired topic and then Activate "theme name".

How to install a WordPress theme?
If you would like to use a distinct WordPress topic for your blog web location, first of all you will have to download it to your local appliance. You can visit our Wordpress topics gallery and download free topics from there:

Once you have the new Wordpress theme on your localizedized hard propel, you have to upload it under the 'wp-content/themes' directory of your website. You have two choices to do that:

You can upload the .zip file of the topic in the 'wp-content/themes' book or directions by the document Manager and extract it online, or
Extract the document in your computer and then to upload the content in the desired folder via FTP.

Now, that you have the new topic uploaded on your site in the right folder, you can glimpse it in your WP admin section and choose it as a default theme for your site.

Saturday, March 16, 2013

How To Create Your Own Basic WordPress Widgets

This week I’d like to show how to do exactly that, and the widget we will be writing is a simple one that picks out a single random post from your site, pulls the featured image, and displays it on the sidebar – a visual “check this out” widget that will help users to find more content on your site.
This is also an extension of a continuing series in which I show you how easy it is to customize your WordPress template.
You may also be pleased to know that we’ve added a new WordPress Tutorials category to MakeUseOf, so be sure to check that out for an ever growing archive of up to date tips and guides to the world’s favourite blogging platform.

Key Concepts: WordPress Queries and the Loop

Each page on your blog consists of a query to your database of posts. Depending on the page you are viewing, the query will change. Your blog homepage for instance, may use the query “get the latest 10 blog posts“. When you view the category archives, the query may change to “get the latest 20 posts for the category family photos only, order the results by date published“. Each query will return a set of results, and depending on the page template being used, each result will be run through the main “loop” of the template. 

Each page can in fact consist of more than one query though, and you can even create your own queries to add functionality to various places in your template. You can see an example of this in use at the bottom of this article – we have a few additional queries that run on every page that aim to show you related articles you may be interested in, or articles which are trending this week.
To make our custom widget though, we will simply need to create an additional query that grabs X number of random posts plus their images, and displays them in some way on the sidebar. I already showed you last week the code to grab the featured image, so we really just need to know how to make a new WordPress widget and place it on the sidebar.

Basic Widget Code

Start by creating a new .php file in your wp-content/plugins directory. You could also follow the tutorial offline then upload it using the WordPress interface, but I find it’s easier to write as we go along in case you need to debug. Call your file whatever you like, but I’m going with random-post-widget.php
Paste the following into the file and save. Feel free to change the section at the top with my name in it, but don’t adjust the rest of the code yet. This is basically a skeleton empty widget, and you can see where it says //WIDGET CODE GOES HERE is where we will add our functionality in later.
<?php
/*
Plugin Name: Random Post Widget
Plugin URI: http://jamesbruce.me/
Description: Random Post Widget grabs a random post and the associated thumbnail to display on your sidebar
Author: James Bruce
Version: 1
Author URI: http://jamesbruce.me/
*/
 
 
class RandomPostWidget extends WP_Widget
{
  function RandomPostWidget()
  {
    $widget_ops = array('classname' => 'RandomPostWidget', 'description' => 'Displays a random post with thumbnail' );
    $this->WP_Widget('RandomPostWidget', 'Random Post and Thumbnail', $widget_ops);
  }
 
  function form($instance)
  {
    $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
    $title = $instance['title'];
?>
  <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
<?php
  }
 
  function update($new_instance, $old_instance)
  {
    $instance = $old_instance;
    $instance['title'] = $new_instance['title'];
    return $instance;
  }
 
  function widget($args, $instance)
  {
    extract($args, EXTR_SKIP);
 
    echo $before_widget;
    $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
 
    if (!empty($title))
      echo $before_title . $title . $after_title;;
 
    // WIDGET CODE GOES HERE
    echo "<h1>This is my new widget!</h1>";
 
    echo $after_widget;
  }
 
}
add_action( 'widgets_init', create_function('', 'return register_widget("RandomPostWidget");') );?>
As it is, the plugin doesn’t do much apart from print out a large title with the words “This is my new widget!“.
how to create widgets
It does however give you the option to change the title, which is kind of essential for any widget. Adding in other options is a bit beyond the scope of this article today, so for now let’s move on to give it a real purpose.
write your own widget

A New Query & The Loop

To make a new query to your blog database, you need to use the query_posts() function along with a few parameters, then run through the output using a while loop. Let’s try this – a very basic query and loop to demonstrate. Replace the line of code that says:
<h1>This is my new widget!</h1>
with the following:
// WIDGET CODE GOES HERE
query_posts(''); 
if (have_posts()) : 
 while (have_posts()) : the_post(); 
  the_title(); 
 endwhile;
endif; 
wp_reset_query();
This is an absolutely basic query using default options and zero formatting of the output. Depending on how your blog is set up, the default will most likely be to grab the 10 latest posts – then all the above code does is to output the title of each post. It’s pretty ugly, but it works:
write your own widget
We can make it a little better right away just by adding some HTML formatting to the output with the ECHO command, and creating a link to the post using get_the_permalink() function:
 
query_posts('');
if (have_posts()) : 
 echo "<ul>";
 while (have_posts()) : the_post(); 
  echo "<li><a href='".get_permalink()."'>".get_the_title()."</a></li>";
 
 endwhile;
 echo "</ul>";
endif; 
wp_reset_query();
write your own widget
Already, it’s looking much better. But we only want one post, picked at random. To do this, we specify some parameters in the query:
 
query_posts('posts_per_page=1&orderby=rand');
Of course, you could change it to any number of posts – in fact, there’s a whole range of extra bits you can pass into the query in order to restrict, expand, or change the order of the results, but let’s stick with that for now. If you refresh, you should see just one post which is randomized each time you refresh.
Now for the featured thumbnail. Replace the code with this, hopefully you can see where we are grabbing the thumbnail and displaying it:
query_posts('posts_per_page=1&orderby=rand');
if (have_posts()) : 
 echo "<ul>";
 while (have_posts()) : the_post(); 
  echo "<li><a href='".get_permalink()."'>".get_the_title();
  echo the_post_thumbnail(array(220,200));
  echo "</a></li>"; 
 
 endwhile;
 echo "</ul>";
endif; 
wp_reset_query();
You can see the finished results again on my development blog Self Sufficiency Guide, though I might have moved things around by the time you read this.
how to create widgets

Conclusion:

See how easy it is to make your own custom widget that can do exactly what you want? Even if you don’t understand 90% of the code I’ve shown you today, you should still be able to customise it somewhat by just changing variables or outputting different HTML. We wrote a whole widget today, but you could easily use just the new query and loop code on any of your page templates.

This Tutorial From