Wbcom Designs | Hire Wordpress Developer
  • Email
  • Facebook
  • Linkedin
  • Twitter
  • Home
  • About
  • Portfolio
  • Website Package
    • WordPress Expert Services
    • WordPress Development India
    • WordPress Customization
    • WordPress Custom Theme
    • Hire WordPress Developer
  • Services
    • WordPress Plugins Development
    • WordPress eCommerce Development
    • WordPress Blog Customization
    • WordPress Website Development
    • WordPress Theme Design
    • WordPress Template Development
    • WordPress Theme Development
  • Buddypress Dev
    • Custom BuddyPress Development
    • Custom Theme Design
    • Custom BuddyPress Plugin
  • Offers
    • Basic WordPress Installation and Setup
    • Premium WordPress Installation and Setup
    • WordPress Theme/Plugin Installation and Support
    • Hosting Transfer/Site Migration
    • WordPress Monthly Maintenance Plan
    • PSD to WordPress
    • WordPress Theme Creation
  • Blog updates
  • Contact us
    • Job Vacancy
Search

WordPress Theme Hacks

Posted by - May 6, 2012 - WordPress Tricks
0

WordPress was originally created as a weblog or blog platform

But now WordPress has grown so powerful that you can use it to create any type of website and use it as a Content Management System (CMS). In this article, I’m going to share some of my WordPress tricks with you on how to make a better WordPress theme. I’m not a programmer nor developer, so I will focus more on the frontend development. Oh yeah, I forgot to mention that WordPress has made it so easy that even a non-programmer (designer like me) can build a wonderful website. My WordPress sites included: N.Design Studio, Best Web Gallery, Web Designer Wall, and some free WordPress Themes.

WordPress Conditional Tags- Conditional Tags are very useful when creating a dynamic WordPress theme.

It allows you to control what content is displayed and how that content is displayed. Here are couple sample uses of Conditional Tags:

Dynamic Highlight Menu- Here is what I used to create a dynamic highlight menu on Best Web Gallery. In the first list item, if it is Home or Category or Archive or Search or Single, add to the <li> tag, which will highlight the “Gallery” button. Second item, if it is page with Page Slug “about”, add.

<ul id="nav"> <li<?php if ( is_home() || is_category() || is_archive() || is_search() || is_single() || is_date() ) { echo ''; } ?>><a href="#">Gallery</a></li> <li<?php if ( is_page('about') ) { echo ''; } ?>><a href="#">About</a></li> <li<?php if ( is_page('submit') ) { echo ''; } ?>><a href="#">Submit</a></li> </ul> 

Dynamic Title tag- Again, I use Conditational Tags to output dynamic <title> tag in the header.php.

<title> <?php if (is_home()) { echo bloginfo(‘name’); } elseif (is_404()) { echo ’404 Not Found’; } elseif (is_category()) { echo ‘Category:’; wp_title(”); } elseif (is_search()) { echo ‘Search Results’; } elseif ( is_day() || is_month() || is_year() ) { echo ‘Archives:’; wp_title(”); } else { echo wp_title(”); } ?> </title>

If you more quires contact us

 

Check Original Postings

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Contact: Varun Dubey

  • +91-9795301072
  • +91-5224037931
  • admin@wbcomdesigns.com
  • vapvarun@gmail.com
  • Contact Us
  • vapvarun
    • Facebook
    • Twitter
oDesk Certified Wordpress DeveloperoDesk Certified PHP5 DeveloperoDesk Certified Adobe Photoshop CS3 DesigneroDesk Certified English Vocabulary (U.S. Version) Professional

The Buddypress and Wordpress CMS Customization, Design, Development and PSD to WP and Buddypress Theme Experts

(c) 2013 Wbcom Designs | WordPress, WPMU & Buddypress Experts
  • Home
  • Hosting
  • Job Vacancy
  • Contact us
  • Privacy Policy
  • Terms of use
CLICK TO CHAT