Site Design and Layout Receive Updates For This Category
June 2, 2011 Site Design and Layout 0 1
Introduction
GUsually, plugin and theme authors need to provide access to a settings (options) screen so users can customize how the plugin or theme is used. The best way to present the user with such a screen is to create an administration menu item that allows the user to access that settings screen. This article explains how plugin authors can add administration menus and screens. Note: the following information assumes a knowledge of the basics of Writing a Plugin and using the Plugin API of Actions and Filters.
Every Plot Needs a Hook
To add an administration menu, you must do three things:
- Create a function that contains the menu-building code
- Register the above function using the 8220;admin_menu8221; action hook
- Create the HTML output for the page (screen) displayed when the menu item is clicked
It is that second step that is often overlooked by new developers. You cannot simply call the menu code described; you must put it inside a function, and then register the function.
Here is a very simple example of the three steps just described. This plugin will add a sub-level menu item under the Settings top-level menu, and when selected, that menu item will cause a very basic screen to display. Note:this code should be added to a main plugin PHP file or a separate PHP include file.
In this example, the function, my_plugin_menu(), adds a new item to the Administration menu via the add_options_page function. Note: more complicated multiple menu items can be added, but that will be described later. Notice the add_action line8211;that invokes the hook which 8220;registers8221; the function, my_plugin_menu(). Without that add_action, a PHP error for 8220;undefined function8221; will be thrown when attempting to activate the plugin. Finally, the add_options_page code refers to the my_plugin_options() function which contains the actual page to be displayed (and PHP code to be processed) when someone clicks the menu item.
The actual detail of these processes is described in more detail in the sections below. Remember to enclose creation of the menu and the html page in functions, and invoke the admin_menu hook to get the whole process started!
Determining Location for New Menus
Before creating a new menu, first decide if the menu should be a top-level menu, or a sub-level menu item. A top-level menu displays as new section in the administration menus and contains sub-level menu items. A sub-level menu means the menu item is a member of an existing menu.
It is rare that a plugin would require the creation of a top-level menu. If the plugin introduces an entirely new concept or feature to WordPress, and needs many screens to do it, then that plugin may warrant a new top-level menu. Adding a top-level menu should only be considered if you really need multiple, related screens to make WordPress do something it was not originally designed to accomplish. Examples of new top-level menus might include job management or conference management. Please note with the native post type registration, WordPress automatically creates top-level menus to manage those features.
If the creation of a top-level menu is not necessary, decide under what top-level menu to place your sub-level menu item. As a point of reference, most plugins add sub-level menu items underneath existing WordPress top-level menus. For example, the Backup plugin adds a sub-level menu option to the Tools top-level menu. Please note with the taxonomy registration, WordPress automatically creates sub-level menus under the applicable top-level menu to manage those features.
June 2, 2011 Site Design and Layout 0 0
ynamic menu highlighting is a way to give users a reference point with which to navigate. It is like the dot on the map that says 8220;you are here8221;. WordPress.org has utilized dynamic menu highlighting.
This image illustrates that the user is currently looking
at a page under the menu 8220;DOCS8221;.
By looking at the menu list you can, due to the use of the dark thick line easily ascertain that you are currently on a page within the 8220;DOCS8221; or documentation section of the site.
This article will explain how to go about making a navigation menu that dynamically highlights the currently displayed page, however there are plugins available that can do most of the work for you.
Also note that if you use the Pages sidebar widget (that comes with wordpress) to display your menu, it already has a CSS class current_page_item, which you can use to achieve the same effect. You can access it like this in your CSS:
.widget_pages li.current_page_item a{
background-image:url(images/activelink.gif);
}
Overview
There are a number of components that make dynamically highlighted navigation work. These include :
- highlighting your current location or navigation position between page loads,
- highlighting other navigation points on mouse-over,
- showing submenus of navigation, leaving a breadcrumb trail (Not in the scope of this article).
- There are also many different possible approaches to achieve dynamically-highlighted navigation. These include for example Javascript, Flash, HTML and CSS in conjunction with PHP. This article covers the CSS/PHP method.
Basic Navigation Lists
The basic navigation list might look something like this:
And there would likely be some bit of CSS in the pages stylesheet that would specifically style list items with the 8220;current8221; ID differently from other list items.
This works fine with static HTML pages, but when dealing with dynamic pages, things become a little more complicated. Perhaps this menu is supposed to be in a sites sidebar and the sidebar is contained in a single file that is called from multiple places. Obviously, as written, only one item would ever be highlighted, no matter what page is actually being viewed. That is not what we want at all!
Making the Code Dynamic
PHP allows us to add the desired highlighting effect that reacts to whatever page is being viewed. Coupled with WordPress is_ functions, we can dynamically test what page is being viewed and then rewrite the code based on the results of that test.
There are two ways to go about this. One requires us to create a variable ($current) that will always equal the page number we are on. It also requires us to put some CSS on each page instead of keeping it all in the main CSS document. The other way means a bit more of a mess with PHP, but it means we get to keep all our styling in a single CSS document.
Method One: With CSS On Each Page
The first step in this method is to remove the one id=8221;current8221; from the list and then add a unique id attribute to each list item.
The next part is where PHP comes in.
We need to write a conditional statement that will test what page is being viewed and define a variable based on the results of that test.
This piece of code uses the is_page(); function to check the title of the current page. If the title is 8220;Page One,8221; the variable $current is assigned the value of 8220;one;8221; if it is 8220;Page Two,8221; $current becomes 8220;two;8221; etc., etc. On a WordPress template, this would go in the header.php file between the
tags.
June 2, 2011 Site Design and Layout 0 0
What is a Gravatar?
Gravatars are Globally Recognized Avatars. An avatar or gravatar is an icon, or representation, of a user in a shared virtual reality, such as a forum, chat, website, or any other form of online community in which the user(s) wish to have something to distinguish themselves from other users. Created by Tom Werner, gravatars make it possible for a person to have one avatar across the entire web. Avatars are usually an 80px by 80px image that the user will create themselves.
Gravatars in blog post comments
A Gravatar is essentially the same thing, but they are all hosted on a single server and are called up by encrypting the users email address via the MD5 algorithm. So instead of having one avatar on one forum you visit, and another at a blog you visit, you could have the same avatar at both.
Gravatars can easily be used within WordPress with the Gravatar WordPress Plugin or added manually in the index.php, comments.php and comments-popup.php template files.
How a Gravatar is Constructed
A Gravatar is a dynamic image resource that is requested from a server. The request URL is presented here, broken into its segments. The URL always begins with:
http://www.gravatar.com/avatar/
The next part is a hashed version of the users email address. The email address MUST be lower-cased first, then have all whitespace removed, before md5 hashing it.
279aa12c3326f87c460aa4f31d18a065
An optional rating (or r) parameter may follow with a value of [ G | PG | R | X ] which determines the highest rating (inclusive) that will be returned.
?r=R
An optional size (or s) parameter may follow that specifies the desired width and height of the Gravatar. Valid values are from 1 to 512 inclusive. Any size other than 80 will cause the original Gravatar image to be resampled using bicubic resampling before output.
038;s=120
An optional default (or d) parameter may follow that specifies the full URL, encoded URL, protocol included, of a GIF, JPEG, or PNG image that should be returned if either the requested email address has no associated gravatar, or that Gravatar has a rating higher than is allowed by the rating parameter. It may also contain one of the following options:
June 2, 2011 Site Design and Layout 0 0
What Are Smileys?
Smileys, also known as 8220;emoticons,8221; are glyphs used to convey emotions in your writing. They are a great way to brighten up posts.
Text smileys are created by typing two or more punctuation marks. Some examples are:
To learn more about emoticons and their history, see the Wikipedia entry on Emoticons.
How Does WordPress Handle Smileys?
By default, WordPress automatically converts text smileys to graphic images. When you type
in your post you see when you preview or publish your post.
To Turn off Graphic Smileys
If you turn off graphic smileys, whatever you type in plain text will remain, and be displayed, as plain text.
Go to your Admin Panel
Select Settings -> Writing
In the Formatting section, uncheck the box for 8220;Convert emoticons like
and
to graphics on display8221;
Turning off emoticons means that when you type
in a post you will see
when you preview or publish your post. So it does not stop you from using emoticons as plain text.
Troubleshooting Smileys
Why Does not it Work?
Smileys may have been disabled by your WordPress admin. Another possibility is the smiley image files have been deleted from /wp-includes/images/smilies.
Why Does not it Work for Me?
If smileys work for others at your site but not for you:
Type a space before and after your smiley text. That prevents the smiley being accidentally included in the text around it.
Make sure not to use quotes or other punctuation marks before and after the smiley text.
Where Are My Smiley Images Kept?
The smiley or emoticon image graphics are found in the /wp-includes/images/smilies directory.
Note that smileys is spelled eys in this documentation and the directory name for the smiley images is 8220;smilies, spelled ies8221;
How Can I Have Different Smiley Images Appear?
Simplest way:
Find your smiley image files in the /wp-includes/images/smilies directory and back them up to another directory
Note the names of each smiley file. Your files must match these names and should be in the same 8220;gif8221; image format.
For predictable behavior, the image sizes should be similar.
Upload your new files to the /wp-includes/images/smilies directory with an FTP program.
If you are up to hacking the code:
If you really must change the file names of the images, edit the file that refers to these images, (in WordPress 2.2, they are located in 8220;functions.php8221;), situated in the /wp-includes/ directory. Follow all precautions when 8220;hacking code8221;.
You can read a tutorial explaining all this in more detail, as well as how to avoid hacking WP code, at Ars Aranea.
There are also WordPress Plugins which allow you to customize your smilies in WordPress.
Why are my Smiley Images Blank?
If you recently uploaded the images, it could be that the images have been uploaded in ASCII format by your FTP program. Re-upload the smileys ensuring that they are transferred in BINARY format.
Some FTP programs have an auto-detect setting which will upload files in the correct format without user intervention. If you have such a setting, turn it on.
Smiley CSS
The smiley images in WordPress are automatically given a CSS class of wp-smiley when they are displayed in a post. You can use this class to style your smileys differently from other post images.
For example, its not uncommon to set up images in a post to appear on the left-hand side of the content with text flowing around the image. The CSS for that might look like this:
.post img {
float: left;
}
This would typically affect all images in a post, including your smiley images. To override this so that smileys stay inline, you could add this to your CSS:
img.wp-smiley {
float: none;
}
For more on CSS in WordPress, you might want to start here.
June 2, 2011 Site Design and Layout 0 0
When you lean towards someone and tell them a little bit of information, you are making an 8220;aside8221; comment. In blogs, you can do that on your blog by passing on small bits of information to your readers called Asides.
Also known as remaindered links or linkblog, Asides were originally implemented by Matt Mullenweg, developer of WordPress, and it soon spread far and wide and became a very popular method of adding little bits of information to your blog.
Asides can be run from within your WordPress site, and do not require installation of another blog. All you need is a few lines of code, and a new category.
Using Asides requires you to make some changes in the WordPress Loop, but if you are careful, everything will be all right.
Asides With Plug-Ins
A number of different Plugins are available to allow you to add Asides to your blog easily. Take a look through the built-in Plugin browser to find one.
Asides With Code Hacking
If you are comfortable editing PHP files, then these two approaches are for you.
Matts Asides
Asides at photomatt.net
The following are the step by step instructions for manually adding Asides to your WordPress site. Below are WordPress plugins that will make the process much easier.
1. Make a backup copy of your index.php in your WordPress Theme, typically found at /wp-content/themes/yourtheme. Seriously. BACK IT UP!!
2. In your Administration Panels > Manage > Categories add a category for your Asides. You can call it Asides if you want. Note the Category ID number of the category. In the following examples we will use category ID 14, but you change this to the category ID of your Asides category.
3. Open your Themes index.php template file in a text editor.
4. Search for:
Comment it out like this:
5. Under this paste:
6. The next line should be your date call (). Under that, paste this:
7 At the bottom of the index.php file, find:
8. Delete those lines. And instead, paste these lines:
Thats it. Asides should now be working. Only thing that remains is styling the CSS.
Styling Your Asides
What weve done is create a very basic style. You should add your own style to blend it in with the rest of your site.
To style the Asides, add these example lines to the CSS:
Displaying Asides on the Sidebar
Asides on the Sidebar at noscope.com
REMEMBER: The following section has nothing to do with Matts asides. They are INDEPENDENT of each other and will not work with each other.
There are times when you want to display your Asides in your sidebar. In the sidebar.php template file of your WordPress Theme, add the following where you wish the asides to appear. If you want them outside of the list, make sure to position this above or below the Unordered List (
- ) tags or within them as a List Item (
- ):
Now, you can style the CSS for the div 8220;asides_sidebar8221; to your liking in the style.css style sheet.
With Asides in the sidebar, you may want to disable them from being displayed within the main loop. This can be easily done with a snippet of code within the loop.
Either before the loop in your index.php file or before the loop in your sidebar.php file, depending on which one comes last. So, for example, if comes after the line in index.php, then you will have to put it before the loop in sidebar.php.
Voila. Asides will now be displayed on the sidebar, rather than within the loop, giving it a more ’linkblog‘ feel.
June 2, 2011 Site Design and Layout 0 0
Horizontal Menus are an excellent way to create a menu of categories or Pages, highlighting specific areas of interest within your website. Many web designers place a horizontal menu under the header, where they draw the eye.
Horizontal menus are created with the HTML List feature. Yes, while they are horizontal instead of vertical, like typical lists, they are still a list. CSS presentation styles allow us to set the list to run on one line instead of a separate line for each list item.
Since horizontal menus are simply lists in a horizontal line, lets start the process with a list.
Contents
[hide]
1 Creating a Horizontal Menu
1.1 Applying the CSS
2 Without CSS
3 More Information on Horizontal Menus
Creating a Horizontal Menu
Below is the simple list for our horizontal menu. We recommend you keep your list small as too many will stretch wide across the screen and may cause some layout problems. We have enclosed the list in a division called navmenu.
As you can see, within our list we have included a PHP tag for the 8220;home page8221; and several categories, as well as a link to WordPress, those helpful folks. The list would look like this, in its simplest form (as styled by the Codex):
HOME
RECIPES
TRAVEL
WORDPRESS
You can also use the wp_list_categories() template tag to list your categories. If you just want categories 1, 3, 4, and 5 listed and the rest excluded, your list might look like this:
The place to put your new list might be just under the header. In WordPress v1.5, open the header.php file in the WordPress Theme folder you are using. Paste the code at the bottom of the file after the header DIV and then save the file.
In WordPress v1.2, open the index.php file and look for the end of the header section and place your list code there.
Applying the CSS
By default, a list runs vertically, each item on its own line. It also includes an image, known as a bullet, before each line. In your stylesheet, we need to add a reference to the navmenu and the first step is to remove the bullet and set our margins and padding to zero for the whole list.
June 2, 2011 Site Design and Layout 0 0
Your posts are filed in different categories. Category information is freqently displayed in the post meta data section near your post or under the heading title. Different WordPress Themes highlight the post meta data section in different areas.
The display of the post categories is generated through the use of the the_category() template tag. And you have the ability to style how these categories are displayed.
Finding Your Categories Tag
The placement of your categories tag may be in one place on the front page and in one or more different places in your single post page, so you may have to do some hunting to find your various categories tags. You might also want to style one differently from the others, but you still have to find them.
The post meta data featuring your categories tag in your Theme is usually found on the index.php, single.php, or sometimes in the sidebar.php template files. Open one or more of these template files and search for:
Once you have found it, take another look at a generated web page of your site and determine how exactly you might want to change this information.
The the_category() template tag instructs the database to get the information regarding the post categories and display it at that point in your template file. By default, it displays the list of categories with a space between each one. You can change this by adding the parameter inside of the tag. Lets begin with simple separators by playing with the category names: WordPress, Computers, and Internet News.
Simple Separators
If you would like to have commas between the categories, the tag should read:
php the_category(
June 2, 2011 Site Design and Layout 0 0
Styling for Mobile devices (cell phones, some PDAs, etc) can be accomplished in much the same way as you can customize the style for printed pages.
The main difference between the two is that instead of using a media type of 8220;print8221;, you will use a media type of 8220;handheld8221;.
User agents (web browsers) decide which CSS media type to use based on what they are doing. Much like the 8220;print8221; media type is used by browsers whenever they print a document, the 8220;handheld8221; media type is used by many different small-screen browsers, when present.
One of the things you might consider doing for small screens, is, for example, hiding the sidebars and other non-text elements. Or, if you use a fixed width page, you will probably want to eliminate that fixed width restriction, and perhaps make the blog entirely simple text format, allowing it to wrap properly on small screens.
It is also good practice to use percentage-based measurements rather than fixed pixel widths. For example, in your css file give the tag body one text size and in text based tags or any tags that you use text in give them a percent to use and test it on a phone.
Large background images often do not adjust well to small devices. It is best to exclude these from your handheld stylesheets and go for simple solid colour backgrounds instead.
If you lack a small screen web device to use, there are emulators available that can view your site in this mode. The Opera Mini Emulator can view your site.
May 10, 2013 Site Design and Layout 0 0
When hiring a designer to build your business website, the hardest part is going to be communicating your specific needs. Every business or organization will have different requirements for a website. A hockey team will no doubt want tons of video, while an accountant will most likely not require very many. Both business websites will be profitable, if the right web designer is chosen.
Now that you have the perfect person or company to build your space on the World Wide Web, it is important that communication is clear. The designer needs to know what you want, and you need to understand what the designer can do. Do your homework; know what you want your site to do. The hardest part of getting any website the way you want it is communication with the designers. Web design has a whole different language. It may be challenging to convey what you want. You may have found the best designer in the world, but if you cannot get him to understand what you want, then the outcome will not be pleasing. Keep talking, explaining and show as many examples as possible. You need to explain your thoughts to the web designer. Give your web designer the complete freedom to build your site with your content and vision. If possible, find a couple examples to show the designer, rather than try to tell him in words that just may confuse more than help.
Chances are that you won8217;t find just a couple examples that have all of the features you want. Use several websites to express the different features you want. Spend as much time as necessary until you find just the right websites to provide examples of your needs. The same goes for the designer, if you do not understand a technical term your designer is using, ask. There will be many terms that you have never heard of before. It is important that you at least know what “Hosting” , “SEO”, or “HTML” is, even if you never actually use this information, at least you will know what the designer is talking about.
Hiring a professional to build your website is a big step in the right direction for marketing your business online. Trust that your web design will be simply perfect, amazing and profitable. Communicate effectively every step of the way. Remember, an awesome, profitable web site is more than just flashy graphics. Much more.
Author Bio:
Ricky Bullford writes about online marketing for business including some of the best strategies available on the market. Through his experience with a Toronto advertising agency he has got great results and recommends web design services for any business looking to optimize their website.
Don8217;t Think Web Design Is Just About Graphics
September 9, 2012 Site Design and Layout 0 0
Web design describes your ‘front end’ of your respective web page which deals with this short article, font design, style and also other parts which might be evident so that you can any person going to an internet site .. The content, your design, your user-friendly stringed related to troubles with a site or maybe large methods utilised are incredibly imperative that you store any kind of customer glued right into a web page. Making use of are usually many of the strategies style your blog so that you can acquire your eye with this target viewers :
• Decide which will come to be ones potential crowd – That may be crucial because if this may not be regarded next planning an internet site . would have been a malfunction. Layout an internet site . based on the target audience’s personal preferences along with personal personal preferences for making these people connect with the fashion along with details along with stick to your blog.
• Branding – Kinds graphic along with the conception everyone crank out is usually an important dilemma if you need to acquire thing to consider targeted at your blog. Use a constructive graphic along with possibly be or maybe ones services or maybe corporation a brand name between ones potential crowd this also could have your crowd targeted at your blog.
• Attention snagging – Create your blog since magnificent as you can for making your viewers stick to your blog for your for a longer time time-frame together with increase the amount of periods.
• Unique style – Create your blog in manners in order that the item doesn’t seem to be any kind of tear derived from one of a lot more web page. Cause it to since unique as you can without having to be tough making sure that viewers are usually astonished to view your style or maybe reason for the internet site.
• Appropriate style – The item is much better that a site style matches using the objective along with details on the web page. Whether it8217;s any kind of school’s web page it8217;s probably to become proper along with basic versus web page of your respective selling bureau.
• Inspiring along with enjoyable web page details – Create this short article with this web page enjoyable along with enjoyable for your succeeding check out from your customer. It really is having fresh new visuals, graphics, rates or maybe details connected with function executed, and so forth.
• Use genuine days to weeks announcement – Enable days to weeks announcement about distinctive details with your web page that will be genuine along with believable still enjoyable along with magnificent.
• Simple along with lucidity related to believed – No matter what details or maybe data you propose to do your blog, make a choice come to be basic along with distinct so that you can understand without any acquiring confused. Enable your thoughts surely or maybe build a sitemap which gives a detailed check out on the distinctive elements distinct to the web site.
• State your thoughts immediately – Don’t defeat concerning the vegetable with your web page although offer you ones landscapes along with details quick along with immediately about people to fully understand.
• Keep your blog clear – So that you can offer you quite a few details, don’t clutter your blog although store distinctive internet pages or maybe back-links about several types of details. Create ones search for a pleasurable practical knowledge without any harming your mind on the viewers.
• Usage related to pictures – Taking pictures is a robust feature obviously, if utilised the right way next it will solitary handedly retain viewers glued targeted at your blog. Work with graphics so that you can shock, affect, confound or maybe enjoyment any kind of customer along with he/she will most likely several once again for your succeeding time frame along with stay for a longer time.
• Designs so that you can advertise the mind – Layout your blog in manners for making viewers utilize their neural so that you can decipher your articles. This will make sure they are employed along with store their thing to consider one specific. Up-date details in a frequent phase to hold shoppers coming back about ano9ther check out.
• Inspire notion or maybe demonstrate comparison – Create your blog on an mental degree beautiful or maybe offer you yet another functionality along with details which may store viewers coming back about a lot more.
• Website pace will be important – Make certain retain web page working pace as soon as possible. Regardless of how considerably creative imagination an individual make use of about planning the internet site, in the event pace is really slower next no-one hope to check out the site for your succeeding time frame or maybe stay for a longer time.
• Updated details – Up-date ones website’s details frequently or maybe about frequent time period times to grab your eye on the viewers whenever they check out.
• Easy navigation – The product or service your blog appeared in manners assist uncomplicated navigations devoid of will be misplaced from your details supplied or maybe style. In case viewers find precisely what they need likelihood is they8217;ll could check out once again.
• Give satisfactory facts along with suggestions – Enable satisfactory facts along with suggestions within your web page to deliver a lot more importance for your details that you just discuss. This will transfuse any kind of confidence along with have faith in one of several viewers.
Click here to find the relevant details in this regards.
Website design – get it look professional towards the visitors

