You can use the $post
global.
Somewhere inside of a function, hooked in appropriately to the post-edit screen:
// Globalize the $post variable
global $post;
// check to see that we are on a page, with a title "About Me"
if ( 'page' == $post->post_type && 'About Me' == $post->post_title ) {
// This is the "About Me" page;
// do something
}
Related Posts:
- What is the text that appears beside the page titles in the list of pages in the WP admin?
- Adding fields to the “Add New User” screen in the dashboard
- Why isn’t is_page working when I put it in the functions.php file?
- Get the ID of the page a menu item links to?
- Displaying the number of updates available in the Admin area
- What’s the difference between admin_url() and get_admin_url() functions?
- How to influence the information displayed on widget inside wp-admin
- How to override admin-bar style
- Disable visual editor on one specific page
- TinyMCE custom styles remove class when switching styles
- How can I programmatically create “child” pages on theme activation?
- How do I create a new WP admin color scheme?
- AJAX handler throws 400 (Bad request) – why?
- wp-admin page is blank
- How to display error messages using WP_Error class?
- Slugs as breadcrumbs for Pages
- Check if has any sidebar active on current page
- Replacing select2 in admin backend for all selects
- difference between add_object_page and add_menu_page
- How to fix a theme with page.php Default Template that accidentally deleted?
- Remove Page Title from Static Frontpage
- Breadcrumb how i can display page title with parent > child title with permalink ? any Idea
- How can I rename the WordPress AJAX URL? [duplicate]
- Pages should have priority when using add_rewrite_rule
- Enqueuing Script in functions.php vs on the page
- Programmatically set page template based on page ID
- How to add a column to the Trash page?
- Comments to only be seen by their author
- How to change menu icon which is overriden (i.e. by WooCommerce) [closed]
- Delete pages and Create default pages for all new network sites
- Custom roles can’t access to wp-admin
- password protected post policy
- how to change link of some wordpress pages
- Make menu structure match page heirarchy on page parent change
- Change the slug of a particular page every x hours
- wp_insert_posts keeps adding multiple pages
- Removing the main link to Jetpack from the menu
- Access / Filter block variations in Gutenberg, in WordPress 5.6
- How to remove howdy dropdown menu content
- How to include local menu based on page id?
- Batch update menu_order attribute alphabetically
- is_account_page() change to page slug
- Add Featured image column into wordpress admin on pages AND posts
- Selective Product Category for Carousel
- Don’t delete a page if it holds users
- List all-childpages on parent-page AND list child-pages on childpage itself but not the current one?
- Display post shortcode content in the sidebar?
- Why is my page feed returning empty content?
- Function only on a specific page
- How to force field validation first, then its values saved durning edit profile?
- Move ‘current-menu-item’ class on #adminmenu li from Posts to Pages for Taxonomy Edit Screen
- How to auto refresh when user change postcode
- Sections and tabs DRY – WordPress settings API
- How to install Segment on WordPress without a plugin
- Functions For Calling Specific Elements
- Get First Child Page ID or Permalink in WordPress Admin
- Get page id or status by private pages?
- Creating A New Admin Menu Tab For Theme Options
- wp-admin won’t load after setting wp-login custom url
- Wp admin – Set default value to 999 in comments
- Remove “Published On” inside wp-admin
- Where do i create my own function in wp-admin
- How to remove comment count column in Posts inside the admin dashboard?
- Enqueue script on every page except one
- Sortable column (by numbers) in admin users
- error at login page in wordpress
- Update to functions.php not showing in dashboard
- Add element to widgetpage
- Best way to disable sidebars on posts (only)?
- “options.php” not found
- How to store a number (coming from cookie) into query vars for later usage in other filters?
- How do I register a new settings page? [closed]
- Only echo Page Content (not page title & page content together)
- get content from page through AJAX
- How to change a specific admin label
- How to change a meta value (of a published post) after X days.?
- How to assign php file(template) to several pages with same prefix page name/slug
- Block all plug-ins from initiating redirection upon activation?
- How to add custom metakey to shop_order page’s searching function?
- Unable to login after registration
- Insert Modal on user first login
- WP Enqueue Script Error
- Remove the delete link from pages without a plugin
- DISABLE wordpress upgrade page
- Change is_front_page() to is_page() to display ‘hero’ on entire site?
- admin-ajax.php & my wp-admin folder url showing in header
- Define an extra field for all pages (with no plugin?)
- What is wrong with functions.php? Fills error log with same error
- How to add next height number in Order Attributes inside the Add new page. [duplicate]
- Custom field not updating via functions upon publishing
- Using array page name together with page id to deregister script
- How to add a class name to the ancestor of a post?
- How to add an excerpt and read more link to a page?
- Changed functions.php file and now site is blank [closed]
- My website is generating weired url parameters of paginated pages
- Setcookie not setting cookies anywhere except admin
- Only allow new subpages to be created
- How do I publish only one page to production after making changes on staging?
- Dash after page title
- Function shortcode – Set Parameter