1.) Debugging Mode In WordPress: define(‘WP_DEBUG’, true); In wp_config.php File
2.) In worpdpress function provide post: get_posts, wp_get_recent_posts, query_posts
3.) In wordpress make simple php file using as wordpress file need to add: require_once(‘../blog/wp-load.
4.) get_permalink( int|WP_Post $post, bool $leavename=false): Retrieves the full permalink for the current post or post ID.
5.) wpdb::get_results( string $query = null, string $output=OBJECT) : Retrieves an entire SQL result set from the database (i.e., many rows).
6.) wpdb::get_row( string|null $query = null, string $output = OBJECT, int $y ): Retrieves one row from the database.
7.) get_categories( string|array $args=”) Retrieves a list of category objects.
8.) is_user_logged_in(): Determines whether the current visitor is a logged in user.
9.) wp_get_current_user() Retrieve the current user object.
10.) get_current_user_id() Get the current user’s ID
11.) get_template_directory_uri() Retrieves template directory URI for current theme.
12.) get_template_part( string $slug, string $name = null, array $args = array()) Loads a template part into a template.
Example: To use this function with subfolders in your theme directory, simply prepend the folder name before the slug. For example, if you have a folder called “partials” in your theme directory and a template part called “content-page.php” in that sub-folder, you would use get_template_part() like this:
get_template_part( ‘partials/content’, ‘page’ );
13.) REST API Developer Endpoint Reference:
i) Posts ——————————
ii) Post Revisions ——————————
iii) Categories ——————————
iv) Tags ——————————
v) Pages ——————————
vi) Page Revisions ——————————
vii) Comments ——————————
viii) Taxonomies ——————————
xi) Media ——————————
xii) Users ——————————
xiii) Post Types ——————————
xiv) Post Statuses ——————————
xv) Settings ——————————
xvi) Themes ——————————
xvii) Search ——————————
xviii) Plugins ——————————
14.) In wordpress set function pirority add_action( string $hook_name, callable $callback, int $priority = 10, int $accepted_args = 1 );
15.)WordPress has got you covered with the function – _plugin_active(). You can simply pass the in the plugin basename and WordPress will do the work to see if it is active or not. Take a look at the following code snippet –
16) There are several ways in which you can improve the performance of your WordPress site. Take a look here – Choose a good host, Keep the WordPress core, along with the theme and plugins up to date, Optimize images for better speed, Optimize background process for improved efficiency, Use a caching plugin, Use CDN (Content Delivery Network), Use the latest PHP version, Take out plugins that you don’t use, Optimize the database, Use third-party source for video hosting
Posted inInterviews