WordPress Theme Development

  Home  Web Development  WordPress Theme Development


“WordPress Themes Development based Frequently Asked Questions by expert members with experience as WordPress Theme Developer. These questions and answers will help you strengthen your technical skills, prepare for the new job test and quickly revise the concepts”



109 WordPress Theme Development Questions And Answers

21⟩ Explain me how do I prevent comment flooding?

Comment flooding is when a lot of comments (probably spam) are posted to your website in a very short duration of time. This is only one aspect of the broader problem of comment spam in general, but it can quickly overwhelm a moderator’s ability to manually delete the offending comments.

WordPress manages the worst floods automatically by default. Any commenters from the same IP or e-mail address (other than registered users with manage_options capabilities) that post within 15 seconds of their last comment gets their comment discarded. The time setting can be changed by a number of plugins that extend this functionality. You might also consider one of the many broader spam blocking plugins, such as Akismet, or even turning your comment system over to Disqus.

You could also just change the time setting by directly hacking the core file, but the correct way would be to create and install a very basic plugin and insert the following code:

function dam_the_flood( $dam_it, $time_last, $time_new ) {

if ( ($time_new – $time_last) < 300 ) // time interval is 300

return true; // seconds

return false;

}

add_filter(‘comment_flood_filter’, ‘dam_the_flood’, 10, 3);

 158 views

23⟩ Explain me what is child theme? Why we used it?

A WordPress child theme is a WordPress theme that inherits its functionality from its parent WordPress theme.Child themes are often used when you want to customize or tweak an existing WordPress theme without losing the ability to upgrade that theme.

Advantage is child theme is Safe Updates,Easy to Extend,Fallback Safe

 141 views

24⟩ Tell me what if I need help after the project?

That is what we are here for! You will get full training at the conclusion of the project and we will be available for email support following the project when needed. Additional one on one training will be available at an additional cost if needed.

Coming soon we will be launching a new members support area here on the web site that will include full training for clients only. This will include a number of PDF downloads, tutorials and video training. This will be available to all past and future clients.

 135 views

26⟩ Suppose we are hacked in wordpress but steps have to do for prevent it?

The various steps have to do when you hacked:-

☛ 1. Change passwords for all users, especially Administrators and Editors.

☛ 2. Re-install the latest version of WordPress.

☛ 3. Make sure all of your plugins and themes are up-to-date.

☛ 4. Install security plugins like wp security for safe from hacked.

 118 views

27⟩ Explain basic functions we generally used in WordPress? Why?

If developer have good knowledge then he/she must know this function name at-least 3-5

☛ 1. is_page() :- Condition for check if page is displayed. Its return true or false.

☛ 2. wp_nav_menu() :- Enabling WordPress 3.0′s Navigation Menu Feature

☛ 3. wp_list_pages() :- Listing All Pages

☛ 4. get_excerpt() :- Displays the excerpt of the current post with read more link for display full post.

☛ 5. is_category() :- Condition for check if category is displayed. Its return true or false.

☛ 6. the_title():- Displays the title of the current post

☛ 7. the_content():- Displays the contents of the current post.

☛ 8. bloginfo(‘url’) :- Getting the Site’s URL

☛ 9. bloginfo(‘template_url’) :- Getting the URL to the Current Theme

☛ 10.the_time():- Display the time the post was published (uses PHP date formatting as a parameter)

 150 views

28⟩ Explain what are the positive aspects of wordpress?

Few positive aspects of wordpress are

☛ Easy installation and upgrade

☛ In-built SEO engine

☛ Easy theme system

☛ Flexibility

☛ Multilingual- available in more than 70 languages

☛ Own data- no unwanted advert on your website

☛ Flexibility and Easy publishing option

 103 views

29⟩ Explain what are the features of wordpress?

☛ Simplicity, make wordpress very easy to use for everyone.

☛ Free open source.

☛ Easy to install.

☛ There are lots of free as well as paid theme to use.

☛ Extends with plugins, we can extends the functionality of wordpress using thousands of free plugins or will create any plugin according to your requirements.

☛ Multilingual, wordpress is available on more than 70 languages.

☛ Multisite, create a child website along with the parent site with the same URL and admin panel.

☛ Flexibility, with wordpress you will create any type of blog or website.

☛ Comment, the built in comment system also make wordpress popular as you can comment your views on website.

☛ Full standards compliance, XML-RPC interface, easy importing, cross-blog communication tools.

☛ Posts are listed entries that are maintained in chronological order timely, but Pages are static and that are are not bounded with time.

☛ Posts are for everyone means social, but in contrast Pages are NOT social. You can categorize Post accordingly, but Pages are maintained in hierarchical order.

☛ Posts are displayed in RSS feed, but not Pages.

☛ Pages are featured with custom template, but Posts are not.

☛ Typographical niceties

☛ No rebuilding

☛ WordPress Links

☛ Comments

☛ WordPress Themes

☛ Cross-blog communication tools

☛ XML-RPC interface

☛ Password Protected Posts

☛ Intelligent text formatting

☛ Full user registration

☛ Spam protection

☛ Easy Importing

☛ WordPress Pages

☛ Bookmarklets

☛ Easy installation and upgrades

☛ Full standards compliance

☛ Multiple authors

☛ Workflow

 132 views

30⟩ Explain me what is WordPress?

WordPress is a best Open Source CMS (Content Management System) which allows it to be used free of cost and don’t need to spend money. You can use it on any kind of personal or commercial website without have to pay a single penny for it. It is built on PHP/MySQL (Both are Open Source) and licensed under GPL. Here PHP is a Programming Language and Mysql is Database Management System. WordPress can be used to built websites and Blogs. WordPress was released in 2003. The main reason for its popularity is the administrator panel is very user friendly, easy to use and manageable for the layman user.

WordPress now is that it is extremely easy to use, even for a beginner. Once the site is setup (that is where we come in) you will be able to update the content of your web site yourself, without having to know any programming at all! If you are able to create a document in Microsoft Word then you will be bale to update your web site, it is that easy.

WordPress also allows your site to be expanded with incredible features thanks to the many plugins available. We will determine at the start of the project what you will need and everything will be setup and customized for you. The world approximately 22% websites used WordPress. Its now most popular blogging tool on internet network.

 117 views

32⟩ Tell me is WordPress good for Google ranking and SEO?

Yes! WordPress was born with one of key features to drive the traffic called built-in SEO and it is the most considered point along with other features in this technology, which makes it popular worldwide. Search engine optimization is considered the best selling point of WordPress to boost the traffic over the web or in other words Google ranking. Although there are multiple CMSs, but they require an installed SEO extension, whether commercial or free, but WordPress is SEO-ready. It can further extend the SEO feature via a few Nice FREE SEO plugins, including All in one SEO and Yoast. These well-known & popular plug-ins help you rank your website’s on multiple search engines like Google, Bing and Yahoo.

 145 views

33⟩ Explain me what is file structure in wordpress?

The main files used in wordpress are:-

☛ index.php :- for index page.

☛ single.php :- for single post page.

☛ page.php :- display the static pages.

☛ category.php :- Display the category page.

☛ archive.php :- For archive page display.

☛ tag.php :- For display the tags page.

☛ author.php :- For display author page.

☛ search.php :- For display the search result page.

☛ 404.php :- For display 404 error page.

☛ taxonomy.php :- For display the taxonomy archive.

☛ attachment.php :- For managing the single attachments page.

☛ header.php :- For managing top part of page.

☛ footer.php :- For manage bottom part of pages.

 145 views

35⟩ Tell me what is the difference between starting a string with single quote and double quote? What you will use in general instance?

A data kept inside a single quoted string is not parsed for variable substitution where as when we initialize the string with double quote the data is parsed for variable substitution. If we don’t require variable substitution particularly then it is always preferred to use single quote as it is much speedy process.

 145 views

38⟩ Tell me how to Change Your Default WordPress Post Category & Post Type?

Ans. Most common issue and most of developer not know this and find hacking(custom coding solution).But it more easy then that.simply navigate to Settings > Writing > and then look for the pull down menu beside “Default Post Categoy.” for change default category selection.

Below that you can find Default post format for changes post type from standard to image post type or a video post type,chat gallery,link and many more.

 179 views

39⟩ Explain me how can I have a static front page and posts display on a page called Blog?

If using WordPress as a CMS, you might want to present readers with a static front page, and then display your posts on another page called Blog. To accomplish that follow these instructions:

Create a Page and use “My Front Page” for the Page Title. Of course, in the content for that Page, you can enter the information you want presented on your site’s front page (see example below if you want to display a post).

Create a Page and call it Blog. Nothing needs to be entered in the content field of this Page.

In Administration > Settings > Reading set the Front page displays to A static page, and select My Front Page for Front page:, and select Blog for the Posts page:.

If you want to further customize your front page, you can create a Template, and fit it to meet your needs:

With the help of the Template Hierarchy article, determine what Template is normally used to display your Pages (e.g. page.php or index.php).

Copy that template to myfrontEnd.php. If you were using the WordPress Default theme you would copy wp-content/themes/default/page.php to wp-content/themes/default/myfrontEnd.php.

In Administration > Appearance > Editor, edit the myfrontEnd.php and change the beginning of the file from:

<?php

/**

* @package WordPress

* @subpackage Default_Theme

*/

to:

<?php

/*

Template Name: MyFrontEnd

*/

?>

Then access the Page called Front in Administration > Page > Edit and set the Template to MyFrontEnd.

Once that’s all working, begin changing myfrontEnd.php to make it look like what you want.

That’s it. You are done.

Use this example for the ‘MyFrontEnd’ Page Template if you want to display one post, instead of the Page content, on your ‘static front page’:

<?php

/*

Template Name: MyFrontEnd

*/

?>

<?php get_header(); ?>

<div id=”content”>

<?php

query_posts(‘p=1′); //set p=x where x is post id of post you want to see or use query_posts(‘cat=1&posts_per_page=1); to show one post from Category 1

if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>

<div <?php post_class() ?> id=”post-<?php the_ID(); ?>”>

<h2><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></a></h2>

<small><?php the_time(‘F jS, Y’) ?> <!– by <?php the_author() ?> –></small>

<div class=”entry”>

<?php the_content(‘Read the rest of this entry »’); ?>

</div>

<p class=”postmetadata”><?php the_tags(‘Tags: ‘, ‘, ‘, ‘

’); ?> Posted in <?php the_category(‘, ‘) ?> | <?php edit_post_link(‘Edit’, ”, ‘ | ‘); ?> <?php comments_popup_link(‘No Comments »’, ’1 Comment »’, ‘% Comments »’); ?></p>

</div>

<?php endwhile; ?>

<div class=”navigation”>

<div class=”alignleft”><?php next_posts_link(‘« Older Entries’) ?></div>

<div class=”alignright”><?php previous_posts_link(‘Newer Entries »’) ?></div>

</div>

<?php else : ?>

<h2 class=”center”>Not Found</h2>

<p class=”center”>Sorry, but you are looking for something that isn’t here.</p>

<?php get_search_form(); ?>

<?php endif; ?>

</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>

 163 views