How we can find complete file path for the required page?

This can be useful for any WordPress based theme. if you need to amend certain code for a specific module/page and if you are unable to locate correct file,  you can try performing a below steps.

  • Open one of the WordPress files named as template-loader.php placed at “wp-includes” folder.
  • At a very end of the file contents, You will find the code as:
if ( $template = apply_filters( 'template_include', $template ) )
include( $template );
return;
endif;

Replace it with the below code:

if ( $template = apply_filters( 'template_include', $template ) ){
echo $template;
include( $template );
return;
}
endif;
  • Save the file and refresh the front page
  • At top of the page, you will get a complete file path which is used as a main template for the related page

How to find database table prefix for a WordPress multisite.

If you have configured multiple sites using a WordPress multisite network and if we face any sort of trouble finding a correct prefix for any site, follow the below mentioned steps.

  • Open the functions.php file located at your theme’s root folder. (functions.php file of the site for which you need to amend the database table contents)
  • Just after the opening PHP tag i.e <?php insert the code as echo $wpdb->prefix; and refresh your sites home page, you will get the associated prefix at the top.

Also, check the video link at: https://drive.google.com/file/d/0B4zqYzsurbeFa2FQdXpQb0cwQmM/view?usp=sharing