Posts Tagged ‘wordpress’

Multiple Content Blocks in WordPress using Categories and Posts

Friday, September 3rd, 2010

Most websites have a main content area which is composed of more than a single content block.
As WordPress is first and foremost a blogging platform, its support for a highly flexible CMS isn't comprehensive. This is mainly seen in the pages feature of WP, where each page has a single editable content area. This is useful only for single content block layouts, and complex websites aren't based on such layouts.

Take the case of a layout having a header, content, right area, left area, footer section etc. There are several methods to make each section dynamic within the same page. One such method is by using Categories & Posts feature of WordPress.

Home Page

Steps for creating a dynamic page

  1. Create a page template : Create a template file say, “home.php” in your “/wp-content/themes/yourtheme directory”.
  2. Create the page : Create a page without any content and assign the template created in the above step to the page.
  3. Create category : Create a category for each section in the layout. For example, referring to the above image, create “Header” category for header contents, “Left-Content” category for left block contents, etc.
  4. Create posts : Create content for each section using posts. For example, say the header section has a logo and a mission/vision text. Create a post having a title, say, “Header-Logo” and paste the logo image in the content area. Then assign the category “Header” to this post. Similarly a post title “Header-Text” can be created. You must note the “PostID” of each post you are creating.

After creating all the posts(content) for a particular page, you need to retrieve the post contents in your template file(home.php) created in the first step. For this, use the code below :

For the header section :

For the left content section :

Similarly retrieve content for right-section and footer area.

Drawback

The only difficulty with this method is with your site's blog functionality. Blog index page will show all the posts created irrespective of the categories. So if you are implementing a blog in your site, you must exclude the categories created for adding page contents from the list of blogs. Otherwise all posts in those categories will also be indexed in your blog page.

How to exclude multiple categories from blog pages (index.php, single.php, search.php, archive.php, etc)?

Use the code :


 

    Wordpress Mobile Optimization

    Wednesday, May 19th, 2010

    Tablet pc and mobile phone access

    Gone are the days when only desktops/laptops were used to view websites. With the proliferation of mobiles and high-end touch devices like the iPhone, iPad, Palm Pre, Android etc, users expect websites to be displayed in their devices, and rightly so, without the entire layout getting broken.

    This is especially true in the case of old websites which are based on table layouts. Tables are often of fixed widths, but on smaller mobile screens, the content overflows the view area, and it is often a hassle for users to navigate the page. This doesn't indicate that div based layouts are automatically optimized for mobile view. However they are recommended for performance gains even for desktop sites.
     
    Divs can be easily optimized for mobiles, where its often a matter of using a different stylesheet. The stylesheet is chosen depending upon the user-agent which requests the website. The mobile stylesheet will most importantly have fixed pixel widths converted to percentages, among other changes. This ensures that no matter what the client device is, layout will always fit accordingly to the screen.
     
    Some other changes that are required for having mobile support are :-
    1. Content should be highly prioritized for mobiles. Users shouldn't be overwhelmed with too much navigation links, and avoidable pages.
    2. As many mobile devices don't support Javascript, it should be avoided.
    3. Only basic css formatting is recommended.
    4. There should be an option for users to switch to the desktop site.
    5. In the case of iPhone, there are certain meta tags which have to be included in the head section of the html,
    e.g.<meta name = "viewport" content = "width = device-width">
     
    Optimizing wordpress websites for mobile devices is easy due to the availability of many plugins. The plugins which are worth integrating to your wordpress installation are:
     
    1. WordPress Mobile Pack- This is a versatile plugin, which has many nifty features, some of them being -
    1.    A desktop switcher option in the mobile screen.
    2.    Automatic resizing of images, splitting of posts into different pages for readability.
    3.    Mobile Admin Panel when wordpress is accessed from a mobile.
    4.    Easy css customization, to achieve varied color schemes.
     
    1. WPTouch- It optimizes wordpress mainly for devices like the iPhone, Palm, Android, which  have large screens. It uses the iPhone specific features such as hover, buttons, etc which would otherwise not work in low-end devices.
    1. MobilePress- This plugin allows the use of customized themes. Two types of custom themes are possible, one for iPhone, and another generic theme. MobilePress is also SEO enabled. Mobile visitor analytics can be tracked with the help of aduity.com which is integrated    into this plugin.
    1. WordPress Mobile Edition- Mobile devices to be shown the mobile theme can be configured manually using this plugin. It provides progressive enhancement for advanced mobile devices. The theme is built using the popular Carrington Theme Framework.

    Wordpress Team

    Software Associates

      Wordpress 3.0 beta release

      Friday, May 14th, 2010

      WordPress 3.0 was released this April, albeit a beta version. Good news, nonetheless. For months, developers have been waiting with bated breath for the latest version of WP which offers significant changes from its previous versions. Till now they had to be content with new releases which were mostly security fixes and went largely unnoticed by the not so savvy WP developer. So what's new in 3.0? Let's take a brief look

      Wordpress 3 theme

      Kubrick has been shipped with WordPress since version 1.5 and it’s been around for five years since the default theme was changed. Back then, Kubrick was a thing of beauty with rounded corners and a pleasant feel to it. It wouldn't be surprising if some WP users thought that the bluish theme was developed by WordPress, which actually was contributed by Stanley Kubrick.
                
      But WP 3.0 has brought a new theme called “2010” based on the theme Kirby. The theme looks cleaner, wider and brighter than Kubrick and is minimalist at the same time. The theme feel can be customized in many ways from the admin too.

      Wordpress 3 navigation

      WP isn't popular for the customization of its navigation system, though lots of plugins   are available, and it was about time that they introduced some new feature.

      The new navigation system was developed and integrated into WP by WooThemes, a WP theme development company. The navigation is very intuitive with support for adding, pages, posts, categories, external URLs, hierarchies, etc. Drag and drop makes creating menus a matter of minutes. Multiple menus are also supported.

      WordPress and WordPress MU ( Mutli User)

      WP MU is a fork of WP which is used to run multiple blogs using the same installation. WP 3.0 supports the integration of the two. Wordpress.com actually runs on WP MU, which isn't hard to guess.

      With 3.0, the codebases of the two will be merged, thus WP MU won't exist as a separate project. This means that, many features restricted to MU will be available with WP, such as BuddyPress and MU will get access to all the plugins available in the single user WP, all in all, making WP stronger, though more cluttered.

      Wordpress 3 custom Post Types(CPT)

      Last, but not the least, the most important feature of WP 3.0. Though it may not be clear at first sight, this is the one that's going to change how people view WP. Till now WP was a blogging software with some bits thrown to accomplish a CMS with the help of pages, and of course lots of plug-ins which hack the core files for adding custom data blocks. But Custom Post Types makes WP more of an actual CMS like Drupal, or Joomla.
       
      CPT can be appreciated with an example. Till 3.0 the only post types that were allowed in WP were posts and pages. Posts were used to add blog contents, while pages took care of the CMS. But pages were limited, because you had to enter all your data into a single content block inside the page. Plugins could fix this problem by providing more content blocks. But issues such as compatibility with other plugins, mainly editors like FCKEditor existed. Plug-ins wouldn't sometimes work when WP was upgraded.
       
      So how does CPT solve such issues? With this feature, you can add any kind of content type. Suppose you have a website which reviews movies. Instead of adding movie details in a page, and then adding details such as name, duration, rating, etc. using custom fields, which is quite a hassle, you can create a new content type called Movie. There are functions to register the Movie content type, and some actual coding, which can be dealt in detail some other day.
       
      Once you create the Movie post, you could have separate fields for entering data such as Movie-images, cast, duration, description. You could create a custom taxonomy for Movies such as Rating, instead of using the default Categories or Tags taxonomy of WP. This is just an example to show how CPT can be used to manage data more elegantly. Its use is limited only by your imagination.
       
      With its new features WordPress 3.0 is in a position to take on the mighty Drupal as a proper CMS, and will help in shedding inhibitions developers might have about its CMS capabilities.

      Our own website is done using Wordpress and surely CPT is one feature we would be looking forward to!

      WordPress Team @ Software Associates

        WordPress basics

        Monday, February 22nd, 2010

        Wordpress competency - Software Associates

        Why Use WordPress as a CMS?

        If you are new to programming jargons, then this blog might be very useful to you. First of all let me explain what is a CMS?

        What is a CMS?

        A Content Management System (CMS) is a software which allows those not endowed with too much technical knowledge to organize and manage web content. It helps in maintaining and updating a website in a quite simple and affordable way.

        This is important for small businesses that do not have huge tech budgets. As the content creators get their websites back into their hands, and they can spend time on what really matters – creating relevant content. This saves valuable time and effort both for the content creator and software firm developing website for him.

        Among number of CMS available, lets look at one of the better know open source system WordPress. This would be an introductory article and we shall see more of Wordpress in coming blogs.

        What is WordPress?

        WordPress initially started out for facilitating blogging, but because of its versatility it can be used for creating non-blog websites too. The fact that WordPress has support for pages, other than posts, renders it capable of acting as a CMS. Posts are dynamic whereas pages are largely static. And most websites (corporate, educational, entertainment, scientific) have most of their page content updated very infrequently.

        It is WordPress’ administrative area that turns it into a CMS. The WordPress admin area provides a WYSIWYG (What You See Is What You Get) editor – similar to a mini-version of Microsoft Word. This allows virtually anyone to add and edit content themselves – all through their web browser – and without knowledge of HTML.

        For more advanced users, there is a “code view” option where you can edit HTML code in a page, post or article, but it is not necessary for creating simple content.

        Benefits of Using WordPress

        The following are some compelling reasons as to why WordPress is being used by 202 million websites worlwide:

           1. Its Free – WordPress is an open source software.

           2. It Integrates With Your Blog Perfectly

        There’s no need to worry about integrating your blog with whatever CMS you’re using for the rest of your site if you use WP for everything, as WP is first and foremost a blogging software.

           3. Easy to learn

        If you can send an e-mail, use Microsoft Word or set up a Facebook account, then you can use WordPress. That saves clients a great deal of time and money. Rather than paying a firm or freelancer to constantly update their site and waiting up to several weeks for those changes to be made, the clients can now make updates instantly on their own.

           4. Tons of Themes

        Themes are a “skin” of a look & feel that can be changed with 1 click. With some customization, themes can be updated to match your brand. It is difficult to find another CMS with a better stock of themes/templates in terms of both quality and quantity.

           5. Search Engine Optimization

        WordPress is designed to be very search engine friendly, with the help of features such as categories, tags, permalinks, etc. This means better Google rankings, and in turn more traffic to your website.

           6. Plugins

        There are literally hundreds of plugins that extend what WordPress does, so the actual functionality is nearly limitless. There are plugins for web advertising, flickr, twitter, e-commerce, newsletters, weather and surf reports, RSS feeds, SEO, Google Analytics and many more.

           7. Multiple Authors

        WordPress’ highly advanced user system allows up to 10 levels of users, with different levels having different (and configurable) privileges with regard to publishing, editing options, and other users.

        There are a lot of other free CMSs available on the internet. Drupal is considered to be more powerful and developer friendly, whereas Joomla! is seen as more designer friendly. However, the beauty of WordPress is that it thinks like a writer and a designer at the same time, and this balance coupled with the small learning curve and vast technical support available is what appeals to most CMS developers.

        CMS Team @ Software Associates