Image

Learn WordPress of Beginner


The-Ultimate-WordPress-Development-Checklist

QUICK OVERVIEW OF WHAT IS COVERED:


#1. STYLESHEET HEADERS

WordPress comes with default themes during the initial installation, so it is advisable to refer to these default files before starting, so that you get a decent idea about developing your own theme.

Under this section of the checklist, you will find some of the basic header settings related to the theme name, URI, version, etc, which will need to be in place before you move on to the more technical part.

You will also need to make sure that your stylesheet provides details about the theme in the form of stylesheet headers.

/* Theme Name: The Name of your theme   
* Theme URI: The URL for more information
* Description: Theme Description 
* Version: 1.0 
* Author: Your Name
* Author URI: Your URL  
* Tags: Red, black, widget‐ready etc
* Template: If you are building a child theme*/

#2. STYLESHEETS

The stylesheet is responsible for the visual design and layout of the theme. That is why, it is very important that you pay special attention to the style.css file.

In addition to that, you also need to make sure you maintain the other CSS files in a separate CSS folder.

theme root folder
  • Style.css
/css/ folder
  • Custom.css
  • Print.css
  • Reset.css
  • ie.css
  • Theme Preview Image (screenshot.jpg/screenshot.png/screenshot.gif)
  • Widget Ready Sidebars
  • Add Rules to your Comment form
  • Backwards Compatibility (WordPress 2.5 +)
  • Add Sample Posts
  • Use sprite images
  • Compress the image size.
  • Properly indent the Css and js code

#3. CROSS BROWSER COMPATIBILITY

While developing a WordPress theme, one of the most important things to ensure is that your theme is fully compatible with the latest versions of all the major browsers.

  • Firefox
  • Internet Explorer 9, 10, 11
  • Google Chrome
  • Safari
  • Opera

#4. PAGE TEMPLATES

Page templates are responsible for the appearance and layout of the page. They are highly specific and generally target an individual page on the website.

Also, naming the page templates gives the WordPress users who are editing the page more control over those specific templates. This section covers all the steps related to the template pages.

  • Index.php
    • Header.php
    • Sidebar.php
    • Footer.php
  • Single.php
  • Archive.php
  • Page.php
  • Home.php
  • Author.php
  • Comments.php
  • Search.php
  • Searchform.php
  • Category.php
  • 404.php
  • Functions.php

#5. STYLE ELEMENTS

Now, before you go ahead, you need to make sure you have styled all the page elements including titles, images, videos, tables, etc, appropriately.

  • h1, h2, h3, h4, h5, h6
  • Captions
  • Images
  • Unordered lists
  • Blockquotes
  • Ordered lists
  • Tables

#6. STANDARD CSS CLASSES

Next thing you need to do is make sure that all the images on your website are aligned properly. The CSS Classes were introduced in WordPress for this purpose.

WordPress 2.5 introduced many classes for aligning images and block elements (div, p, table, etc.), like alignleft, aligncenter, alignright. And if you need to align or style the images separately, you can use alignnone.

Similarly, the same CSS classes can be used for aligning images with captions.

  • .alignnone
  • .wp-caption
  • .aligncenter, div.aligncenter
  • .wp-caption.alignnone
  • .alignright
  • .wp-caption.alignleft
  • .alignleft
  • .wp-caption.alignright
  • a img.alignright
  • .wp-caption img
  • a img.alignnone
  • .wp-caption p.wp-caption-text
  • a img.alignleft
  • .screen-reader-text
  • a img.aligncenter
  • .screen-reader-text:focus

#7. CSS & MARKUP VALIDATION

Now, you need to validate your CSS using the CSS Validation service. In the same way, also validate your HTML with the Markup Validation service.

CSS
  • Style.css

Add alt attribute to image tag

HTML (tip: browser > view source)
  • Index.php
  • The other templates.
  • With/without Comments
  • Login Required
  • Password Protected

#8. WORDPRESS CODE

The tags mentioned here are life savers when it comes to developing custom themes. Therefore, it is important that you have proper tags for all the different elements of your web pages in place, as shown below.

<?php include(TEMPLATEPATH . ‘/x’); ?>
<?php the_time('m‐d‐y') ?>
<?php /* Template Name: X */ ?>
Use
<?php get_template_directory_uri(); ?>
or
<?php bloginfo('template_url'); ?>
instead of static links to files [images / .js / .css]
Use
<?php define('VARIABLE','VALUE') ?>

for constant value
[For eg: Version 1.1 or Template directory link]

The loop
<?php if(have_posts()) : ?>
<?php while(have_posts()) :the_post(); ?>
<?php endwhile; ?>
<?php endif; ?>
/%category%/%postname%/
Use
For eg:
is_page('PAGE_NAME')
is_home()
is_front_page()
is_single('POST')
get_post_type( get_the_ID())=='POST_TYPE'
Generation of XML site map

#9. BLOG ELEMENTS

Finally, ensure that all the style elements of your blog are taken care of, and you are good to go!

  • Title/Logo
  • Comments
  • Navigation of Pages
  • Copyright message
  • Navigation of Categories/Tags
  • Past/Next links
  • RSS links
  • Back to Top link
  • Search Form
  • Advertisements
  • Archives links
  • Add Function to unlink the links from the comment and add rel=”no_follow” attribute to the links while submitting the form
  • Social Sharing Links
  • Google Re-captcha on the Comment form
  • Dates/Timestamps

how to extect folder and files using php


<?php 
    // config
    // -------------------------------
    // only file name + .zip
    $zip_filename = "YOURFILENAME.zip";
?>

<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8' >
    <title>Unzip</title>
    <style>
        body{
            font-family: arial, sans-serif;
            word-wrap: break-word;
        }
        .wrapper{
            padding:20px;
            line-height: 1.5;
            font-size: 1rem;
        }
        span{
            font-family: 'Consolas', 'courier new', monospace;
            background: #eee;
            padding:2px;
        }
    </style>
</head>
<body>
    
class="wrapper"> php echo "Unzipping " .__DIR__. "/" .$zip_filename. " to " .__DIR__. "
"
; echo "current dir: " . __DIR__ . "
"
; $zip = new ZipArchive; $res = $zip->open(__DIR__ . '/' .$zip_filename); if ($res === TRUE) { $zip->extractTo(__DIR__); $zip->close(); echo '

Extract was successful! Enjoy ;)


'
; } else { echo '

Zip file not found!


'
; } ?> End Script.
</body> </html>

how to select customer group on registration in magento


 <group_id><create>1</create></group_id> code into the customer account fieldset.

(app\code\core\Mage\Customer\etc\config.xml)
Before adding code:

<fieldsets>
<customer_account>
<prefix><create>1</create><update>1</update><name>1</name></prefix>
<firstname><create>1</create><update>1</update><name>1</name></firstname>
<middlename><create>1</create><update>1</update><name>1</name></middlename>
<lastname><create>1</create><update>1</update><name>1</name></lastname>
<suffix><create>1</create><update>1</update><name>1</name></suffix>
<email><create>1</create><update>1</update></email>
<password><create>1</create></password>
<confirmation><create>1</create></confirmation>
<dob><create>1</create><update>1</update></dob>
<taxvat><create>1</create><update>1</update></taxvat>
<group_id><create>1</create></group_id>
</customer_account>
</fieldsets>

Open the file template/customer/form/register.phtml and add the code  in the form
__('Group') ?>*
__('Group') ?>" class="validate-group required-entry input-text" /> getGroups()->toOptionArray(); ?> ">
save value datbase after this line $this->_successProcessRegistration($customer);     $customer->setGroupId($this->getRequest()->getPost('group_id'));