wait did you check these before releasing your wordpress theme

5

Click here to load reader

Upload: ossmedia-ltd

Post on 11-Jul-2015

99 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Wait did you check these before releasing your wordpress theme

Wait! Did You Check These Before

Releasing Your Wordpress Theme?

Wordpress has several components that play an

individual but pivotal role in making the entire process of

Wordpress development strategic and simplified. One

such component is a Wordpress theme. Themes in

Wordpress are a collection of CSS and graphics that

facilitates the designing of your Wordpress website. Once

you have chosen the right theme for your web venture,

all you have to do is to download the theme and

customize as per your need.

If you are designing your own Wordpress theme and

releasing it in a marketplace, there are several things

that you need to consider. You need to ensure that you

work in the right direction so that your theme can sustain

the tough competition prevailing in the market. Before

you release your own Wordpress theme or the one

developed through outsource web development, here

are a few final checks that you must make:

• Make Use of Pagination: Paginated entries offer an

enhanced viewing experience and easy navigation to

your visitors. In pagination, posts are divided into

pages by author name and then a <!-nextpage->

Quicktag. Not all Wordpress sites use pagination, but

in cases when pagination is missing, users are

unable to access further than the first page. The

easiest way to enable pagination is to use

Page 2: Wait did you check these before releasing your wordpress theme

wp_link_pages tag:

wp_link_pages(array('before' =>

'<p><strong>Pages:

</strong> ', 'after' => '</p>', 'next_or_number' =>

'number'));

• Display Attachments in Correct Manner: When a

user clicks an attachment in your post, the process is

supported by a special file called attachments.php.

Though using attachment.php is not a necessity, but

there are several advantages associated with its

utilization. For instance, if a reader wants to view an

image attached in your post in full size, he can do so

without losing access to your site. Furthermore, you

get the freedom of displaying some essential

information about the attachment, such as the

source of attachment etc. The attachment.php of

TwentyTen theme in Wordpress 3.0 provides the

option of displaying image size.

if ( wp_attachment_is_image() ) {

echo ' <span class="meta-sep">|</span> ';

$metadata = wp_get_attachment_metadata();

printf( __( 'Full size is %s pixels', 'twentyten'),

sprintf( '<a href="%1$s"

title="%2$s">%3$s × %4$s</a>',

Page 3: Wait did you check these before releasing your wordpress theme

wp_get_attachment_url(),

esc_attr( __('Link to full-size

image', 'twentyten') ),

$metadata['width'],

$metadata['height']

)

);

}

• Remove Comments From Protected Posts:

Wordpress gives you the option of protecting a post

using password. This way, only the users who have

the password can access the protected content. If,

however, you provide the option of commenting in

protected post, you defeat the purpose of protecting

in the first place. There is a simple remedy to disable

comments on protected posts:

<?php if ( post_password_required() ): ?>

<p class="nopassword"><?php _e( This post is

protected. You need password to access and post

comments on this post.' , 'sampletheme' ); ?></p>

</div>

<?php

return;

Page 4: Wait did you check these before releasing your wordpress theme

endif;

?>

• Always Remember to Use wp_head() and

wp_footer():

Don’t fail to use the wp_head() and wp_footer in

your post. Call the wp_head() function before closing

the post and the wp_head() function just before

putting close to the head tag. Both these functions

are action hooks and anyone including plugin

developers and theme developers. In case you miss

out on these plugins, some of the functionalities in

your Wordpress website might not work, including

custom headers.

• Enable Custom Menus:

The custom menus feature has been awaited since

long. So, now that the functionality has been

introduced with the release of Wordpress 3.0, why

not take advantage of it. Once you have registered

with theme support, you can display the custom

menu using wp_nav_menu()

wp_nav_menu( array( 'theme_location' => 'main_na

v' ) );

Page 5: Wait did you check these before releasing your wordpress theme

If you negate all the aforementioned possibilities, you are

likely to release a Wordpress theme that is accomplished

in all forms.