// You can retrieve your link and get the id (contact ID=4 for example)
$link = $_SERVER['HTTP_REFERER'];
$page_id = url_to_postid($link);
if (page_id == '4'){
$subject = "This subject line is for the Contact page.";
} else {
$subject = "This subject line is for every other page.";
}
Related Posts:
- Function to return true if current page has child pages
- List of all theme customizer control types?
- Set the transport of the Customizer ‘header_image’ core setting to ‘postMessage’
- How to add default images into theme customizer image control?
- Is the regular ajax request method safe or I should use admin-ajax.php?
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Converting HTML Template to WordPress Theme
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- How to disable controls in theme customizer?
- How to obtain the current website URL in my theme?
- What exactly do this function declared into functions.php file of a WP theme?
- Where can I find the declaration of `$_wp_theme_features`?
- A Customizer checkbox control that sets the setting to “” or to “blank” and show() or hide() a color control
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- How to add button to top of theme customizer?
- Need help setting default setting value for radio button in theme customizer
- Get author full name
- How to preserve PHP modifications while upgrading WordPress?
- Is it possible to get a theme customizer setting from wp.customize using jquery?
- is there a simple way to list every templates / php files used to generate a specific page?
- Dynamically change feature image in customiser
- One button to change all settings in theme customizer?
- Change comments form title on a page by page basis
- Setting up the child theme so as to enable right-to-left WordPress?
- Design view breaking on Pages
- How can I loop into two different DIVS without repeating the DIVs
- Removing unnecessary wordpress files
- WordPress Ajax Data problem
- How do I list the_tags() into HTML data-attribute
- How to make thumbnail image fit into a div where image dimentions are completely different?
- How to display something in a div when the user clicks on a text in another div – no page refresh [closed]
- Why WordPress architecture is not pure object oriented and it don’t use MVC pattern? [closed]
- How to break down importing of feeds
- Custom Logo URL | Help me print the URL of the custom logo I inserted into my theme
- Why is this Ajax not working?
- PHP can I add line numbers to file_get_contents()
- Displaying theme options in css
- Setting custom canonical urls
- Trigger popup in a php if/else statement
- How to store data from multiple forms using ajax and php
- PHP 8, AJAX mail form to function.php doesn’t work
- How do I add custom bulk actions to multiple custom post types?
- what is the best practice to add new field to an api route
- Ajax request not sending to server and returning – wp-admin/admin-ajax.php 400
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- populate form fields in a loop with ajax
- Error in custom php function doesn’t exist
- Customizer: active_callback and sanitize_callback incompatibility?
- Menu jumping when calling it via PHP
- Modify custom field input data before creating a new post
- how to make custom ajax handler?
- Trying to retrieve post meta
- Need help enqueueing webfonts
- Is there a way to conditionally check whether a WordPress post title is empty?
- Redirect to another page using contact form 7? [closed]
- Use .php file as page instead of wordpress page & template file?
- Use WordPress function in php file
- is_user_logged_in() not working in AJAX validation call
- Underscore – Self hosted fonts
- Using data sent via AJAX in multiple functions on a WP plugin
- Theme not calling Jquery properly
- Function Reference Documenting Template Tags for use in Custom Theme Templates?
- Simple AJAX notification when the new post is added to the database
- Create page template via functions.php?
- How to create a field in customize and show that in header.php?
- How to make function appear in sentence?
- Removing “Powered by” footer using child theme PHP [closed]
- get_theme_mod outputs number when using WP_Customize_Cropped_Image_Control
- How to add aria role and schema markup to custom walker container
- Execute Jquery when a specific page in my plugin is loading
- pass html code to worpdress
- Ajax URLs without #!, how to prevent falling into single.php on load or reload?
- AJAX function not working [closed]
- Customize field names in backend profile edit page through function.php [duplicate]
- Getting text from custom field from customizer
- Need help for some PHP code
- Database entry removed on browser refresh, Ajax PHP jQuery
- How to change basename url for wp-admin?
- how to replace h1 entry title with h2 in category pages only
- Problem with displaying CSS Stylesheets – Am I adding them correctly in my wordpress child theme?
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- register_block_type is not working properly
- Submit remote form to wordpress REST API and save data to custom post type
- Can an AJAX callback function access a PHP variable which was defined during initial page load?
- Offset with ajax load more posts duplicates
- Custom theme admin-ajax.php 400 (Bad Request)
- Remove node from multisites?
- How to send Ajax Call from frontend without using wp_localize_script in Theme
- Woocommerce variable products are being added to the card on the homepage (ajax)
- How to get php file based on URL in WordPress
- How can I customize a WordPress theme before it’s downloaded?
- wp_delete_comment is doing nothing
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- Registration form not registering First and Last name
- Adding code to the function file
- Display a list of users with avatar filterable with alphabets
- Adding php within a return statement [closed]
- AJAX: WordPress filters inside $html do not work as intended
- Add multiple HTML attributes to an Elementor button