// 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?
- Why have on every line
- Cleaning up WordPress to improve performance?
- Proper use of Output Buffer
- Include a external PHP file into a WordPress Custom Template
- Need help setting default setting value for radio button in theme customizer
- Get author full name
- username_exists() function can’t be access without logging in
- Is having multiple theme customizers for different pages possible?
- How to remove hardcoded characters from playlists?
- function_exists call in function.php
- How to preserve PHP modifications while upgrading WordPress?
- Is it possible to get a theme customizer setting from wp.customize using jquery?
- Debugging an error: wp_enqueue_style was called incorrectly
- How to get the registered sidebar’s name by its id?
- is there a simple way to list every templates / php files used to generate a specific page?
- Can i check if user is doing any ajax request?
- 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
- Hide a menu-item and its submenus and display a ‘Log in’ link if the user is logged out
- The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”
- Setting up the child theme so as to enable right-to-left WordPress?
- Design view breaking on Pages
- delete an array element when its date expires
- Understanding WordPress child theme custom JS loading
- How can I loop into two different DIVS without repeating the DIVs
- Removing unnecessary wordpress files
- Remove css styles from specific page
- Overriding a theme redux file in child theme
- Validate a users email address when using gmail to register
- WordPress Ajax Data problem
- Widgets not showing in my custom theme
- How do I list the_tags() into HTML data-attribute
- Click loads template via ajax
- Can I change a variable in a content part while calling it?
- 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
- What is the fastest way to load PHP functions that are only used in one theme template?
- How to speed up admin-ajax.php in wordpress
- My Own layout in WooCommerce pages [closed]
- Differences when using the the_time and the_date functions
- Why is this Ajax not working?
- PHP can I add line numbers to file_get_contents()
- Can’t load WP function into external function
- Displaying theme options in css
- Set WordPress Default Template
- Setting custom canonical urls
- Trigger popup in a php if/else statement
- Customizer: Output default value in Customizer CSS
- get post based on category chosen in drop down – The ajax method
- Load a page into a div with Ajax
- How to remove the cufon script from Dzonia Lite theme [closed]
- 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?
- How to check if a meta value has already been assigned to any user?
- what is the best practice to add new field to an api route
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- How to pick the default selected value in wordpress dropdown?
- Ajax request not sending to server and returning – wp-admin/admin-ajax.php 400
- Why ajax doesn’t work on certain wordpress hooks?
- 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
- dynamic dependent select dropdown
- Customizer: active_callback and sanitize_callback incompatibility?
- How to add a do_action on refreshing of WP customizer?
- Populate editor with some content of a page with a page template
- Catchable fatal error: Object of class stdClass could not be converted to string after WP 4.7
- Menu jumping when calling it via PHP
- Modify custom field input data before creating a new post
- how to make custom ajax handler?
- Skt full width basic slideshow problem
- How do I link a button I created in theme customizer to a function?
- Trying to retrieve post meta
- Need help enqueueing webfonts
- Is there a way to conditionally check whether a WordPress post title is empty?
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- Redirect to another page using contact form 7? [closed]
- WordPress get_post_meta issue
- Modify php code to pass a page id as a parameter in order to create a breadcrumb