Logo F2FInterview

Wordpress Interview Questions

Q   |   QA

The following files affect the public display of your site, and each can be easily changed by using the Built-in Editor from the Templates option in your admin screen:

   * index.php
     This affects the layout of your content.

   * style.css
     This is how the style and presentation of your blog is controlled.

   * wp-comments.php
     This controls the layout of user-submitted comments and trackbacks,
and the comments submission form.

* wp-comments-popup.php
Only needed if you decide to use a popup comments box.
(Popup comments are off by default).

Be aware that if the theme you modify is updated, your modifications will be overwritten. To better organize your modifications and protect them from updates, consider creating a Child Theme in which to keep all your modifications.  

To enable popup comments, choose the appropriate method for the version of WordPress you are using.

WordPress version 2.0 Default Theme

Inside header.php add this line:

<?php comments_popup_script(); ?>

above this line:

<?php wp_head(); ?>

For example:

<?php comments_popup_script(); ?>
<?php wp_head(); ?>
</head>

WordPress 2.0 Classic Theme

In the file header.php locate this line (line 21):

<?php //comments_popup_script(); // off by default ?>

And remove the first comment markers, changing it to this:

<?php comments_popup_script(); // off by default ?>

WordPress version 1.5 Default Theme

Inside header.php add this line:

<?php comments_popup_script(); // off by default ?>

below this line:

<?php wp_get_archives('type=monthly&format=link'); ?>

Example:

<?php wp_get_archives('type=monthly&format=link'); ?>
<?php comments_popup_script(); // off by default ?>
<?php wp_head(); ?>

WordPress version 1.5 Classic Theme

Inside header.php is this line:

<?php //comments_popup_script(); // off by default ?>

Change that to

<?php comments_popup_script(); // off by default ?>

WordPress version 1.2

Inside index.php is this line:

<?php //comments_popup_script(); // off by default ?>

Change that to

<?php comments_popup_script(); // off by default ?>
 

To permit images to be uploaded to your site:

From the admin panel, go to Options -> Miscellaneous

  •     Select the option to Allow File Uploads

    •         If you need help with finding the absolute path, see How do I find the absolute path I need for uploading images?.
    •         If you need help with changing permissions, visit Changing_File_Permissions.
  • Then check main menu across the top. Click Upload
  • In Wordpress 2.0, go to Write -> Write Post or Write -> Write Page and use the upload interface therein.  

Just simply create a file to reside at wp-content/db-error.php, and in that file put the message you want displayed to users when WordPress determines the database connection is not available. That file will be used in place of "Error establishing database connection" message. You could even use the db-error.php to redirect users elsewhere. Here's an example for db-error.php:

<?php
  echo '<h2> This site is currently experiencing a problem with the database server.</h2> Press your browser Reload button to try again!';
?>

 

Put this inside the <head> section of your Theme's template header.php file:

<base target="_blank" />

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: