for your home page:
On index.php or your home page custom file use:
if (is_home()){
echo 'hi home!';
}
for any other page except 404:
use the file page.php or the custom one:
for example the link is www.xyz.pt/chat/
if (is_page('chat')){
echo 'hi page!';
}
for page 404:
if (is_404()){
echo 'hi error 404';
}
Related Posts:
- How do I only load a plugin js on it’s settings pages?
- AJAX Call Via Vanilla JavaScript In WordPress Plugin Development
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- How to Reload the Dashboard After Clicking Update in Quick-Edit?
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Dequeue / Deregister script and replace it with a new plugin
- Insert code after tag without using functions.php?
- How do I use WordPress PHP functions in my Javascript code?
- Passing select control value to block
- How to create popup same as wordpress popup feature
- Has anyone used require.js for handling plugin scripts?
- Passing RichText attributes to function onChange
- How do I store information in a dynamic block in WordPress?
- How to load plugin after page is loaded – pagespeed issues
- Get IDs of Images from Gallery Block in InnerBlocks of a Custom Gutenberg Block
- React JSX in WordPress Plugin Development
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- Best approach to fetch data from wp options to js file or php file
- Updating the Drag-To-Share eXtended share URLs?
- Enqueue WordPress plugin scripts below all other JS
- How to add Internationalization in WordPress using Javascript/React?
- wp.media javascript issue with on select
- How can I remove the WordPress-Version (?ver=5.x) from my plugin
- Redirect to another page using contact form 7? [closed]
- Delay JavaScript files from loading
- How to generate an all in one WordPress New content, plugin and theme update report on a website? [closed]
- How to use custom Javascript code inside a plugin?
- how to request a script more than once in wordpress
- Set Button in PluginDocumentSettingPanel Content (WordPress Gutenberg)
- Fixed: Console.log twice in the edit function
- Cannot run script properly with my custom plugin
- How to properly enqueue jQuery knob on WordPress without conflict?
- Problem with wordpress has_action() function
- Multiple image selection custom widget
- Create a form and have custom menu display based on user answers?
- AJAX update fails for public/non-admin users
- WordPress ajax error 400 bad request for sending data to remote site [duplicate]
- How to use information from the database in the front-end?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- How to pass value from WordPress to Javascript
- Javascript in plugin not working
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- Creating a user ‘add custom field’ section
- Need to hide an element depending on date and post category
- Ajax, jQuery and WordPress
- Plugin – including external javascript calling google maps
- get_option include in my adsense
- Is it possible to run javascript on plugin deactivated?
- Ajax in Plugins: returns the whole page
- Load css classes after using ajax calls
- How to create post comparison in wordpress
- How to access values from your own settings page in javascript?
- Vanilla javascript in custom gutenberg block not working
- Update plugin from personal API
- Does a plugin’s “main” file need to be named the same as the folder containing it?
- Symlinked plugin directory doesn’t appear in Admin
- How can I limit functionality in one version of a plugin?
- How to avoid redefining requirejs in plugin when another plugin also uses requirejs
- How use %like% in sql statement wordpress
- Can I use a form in a dashboard widget?
- Retrieving plugin options value saved through setting
- Problem in loading javascript in footer
- How to ‘clone’ a wp plugin to make small changes
- add mediaelement.js plugins into WordPress video player control bar
- MITM risk of not sanitizing?
- Is there any kind of theme on WordPress to sell my own movies?
- Suggestions on Approach to New Plugin I’m Stuck On
- How to redirect users to their profile after they successfully edit their profile
- What is wordpress way to access a plugin’s classes/models to load custom post type data?
- flush_rewrite_rules() not working with update_option_{$option}
- How to ignore extra whitespaces in translation functions like _e?
- How does translation (gettext) work for translating config file of plugin?
- using wp_footer hook in a plugin
- Want to create custom design of progress indicator in wpforms
- How to prepare (compress/zip) a plugin to enable updating instead of adding new instance?
- WC Fix Attributes – ‘Add New’ Not Searchable/Delayed
- How to dynamically add template in Innerblock?
- How to capture hidden values with Gravity Forms
- How to translate to spanish wordpress hardcoded content/files?
- what functions to use to resize images and create DB metadata for them after/during upload?
- How to Create a Learning Management Plugin in WordPress to Manage Courses [LMS]
- Store admin page into variable
- WP Plugin CSS not being applied to page
- Overwriting Plugin’s Ajax callback function from theme
- How can I get the Post ID and Post Type within a Must Use Plugin?
- Unable to sync woocommerce variations
- Can’t find variable is_single in my jQuery plugin
- WordPress Cron function is not working
- Plugin hook breaks new WP 4.0 media library grid view?
- How to get site homepage from plugin?
- Get page type to display content
- Move specific javascript to the footer
- Is an Office a custom post type [closed]
- How to add image for custom taxonomy
- wordpress Ajax success doesn’t return the value
- How to open author url linked to a new tab in settings page in the WordPress plugin list
- add_meta_box showing blank screen in my page
- Plugin translations are not loaded from translate.wordpress.org
- Use inline callable for hooks and filters
- Error in using ‘admin_enqueue_scripts’ action through a class