Mostly from https://stackoverflow.com/questions/7118823/check-if-url-has-certain-string-with-php
Check if the url has your string, then spit something different out based on it. Perhaps something like…
$url="http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if (false !== strpos($url,'forms.woo.com')) {
echo '?pageurl=" . home_url() . get_the_ID(); // there"s your page id url
} else {
the_permalink(); // plain old permalink
}
Related Posts:
- How to get a URL parameter from a URL with get_query_var?
- How to remove query string from static resources
- Pass query string to page
- query_vars Filter: Would You Ever Use It When $_GET is Available and You Don’t Need a ‘Pretty’ URL?
- when the incoming url is a query, in which function does WP begin to work with it?
- Accessing custom URL parameters
- Remove query string except from google map api
- Sorting by 2 Custom Fields + Post Title
- Use “name” query string to refer to form field instead of pagename
- How to echo a string in custom posts args from a custom field?
- Custom query vars empty
- How can I get query string values in JavaScript?
- What is the difference between URL parameters and query strings?
- How to get GET (query string) variables in Express.js on Node.js?
- Node.js: Difference between req.query[] and req.params
- How to get URL parameter using jQuery or plain JavaScript?
- Get querystring from URL using jQuery [duplicate]
- Fastest way to implode an associative array with keys
- Get query string parameters url values with jQuery / Javascript (querystring)
- use query string in URL to display content on the page
- rewrite rules and querystring
- Paginate Link generate additional #038; whenever my Url have multiple Query String
- Querystring parameter getting lost in rewrite rule
- order by second word in title?
- Is it possible to add an admin page using add_submenu_page() and pass a var in the query string?
- Can ‘numberposts’ be passed in the URL query string?
- How can I include a query string with get_permalink
- Redirect to post after submission with Gravity Forms? [closed]
- Shortlink directly to a media file?
- Visually change theme via query string?
- Change link to other post to shortlink in the editor
- How can I Rewrite a ‘page’ URL based on query string parameters?
- Passing & Reading URL Parameters with URL re-writing
- Create additional short URL with custom field and 301 redirect
- Prevent redirect to page/page when reserved term ‘name’ in $_POST when value is a page/post title
- Can’t pass table to $wpdb->prepare
- How can I get the [video] shortcode to allow query string parameters?
- How do I add a php statement to a jQuery string
- Showing random content / pictures from earlier posts in a sticky post?
- Random Alphanumeric Key URLs
- Add custom URLs to WordPress’s XML sitemap
- How to get “extended” path info from URL in a plugin
- Concatenate site_url and string doesn’t work
- Query_posts $query_string
- Passing array of strings to a SQL statement in a WordPress plugin
- Wp Login redirect strips parameters from url
- Is doing_wp_cron a necessary query string when scheduling cron.php as a cron job?
- Query string becomes encoded when a static page is used as homepage
- Add query string to url and display it as normal url part /folder/
- Meta box io oembed returns list not array
- Count number of published posts by type
- Short links in wordpress not working properly
- How to include DW Question & Answer plugin in front page template?
- Problem duplicated shortlinks bitly
- Social sharing post’s shortlink instead of permalink
- How to order results by date and meta key?
- Using API to generate short link
- Remove Query String from URL on Redirect – Redirection Plugin
- Change gravity forms confirmation redirect query string to include entry id [closed]
- How do you Query posts with nothing in common?
- mod_rewrite empties QUERY_STRING if starting with number [closed]
- Can’t add external rewrites
- Query String being Removed Creating a Pagination Issue within a Custom Plugin
- How to remove query string from static resource in WordPress?
- Remove query string specific key value
- Check if page is embeded
- What is the term shortlink structure?
- urlencode query string in gravity forms confirmation redirect
- get_posts – find out if querystring was crap and fallback is used
- how query string in wordpress receive the value other than post and page [duplicate]
- Creating a Video Content Page (how to use query strings in wordpress)- Help!
- Detect permalinks when passing querystring in REST API requests
- Replace text string on individual page
- Keep query string in url after executing a serch
- How to build a shortcode which can insert a query string into a DB table
- How get a value from a plugin into another plugin through action/filter
- How to get “string” away – replaced with “nothing” [closed]
- pass query string on url to filter media
- How to stop WordPress Search form from searching only in current page?
- add_rewrite_rule not working for me
- how to make URL link query string
- Undefined index: b in /path/file.php relating to querystring parameters
- Twitter shortlink 404 not found [closed]
- magnific popup + gravity form query string not passing
- How to remove ?wp-mce from page source?
- Replace shortcode in substring
- Short URL in content
- WordPress URL Rewrite for dynamic and customized URL
- Insert custom PHP head above in WP pages
- Custom query, multiple custom keys
- how to access query string in wordpress?
- Multiple Category Query
- Search Query for Multiple Terms In Same Taxonomy
- Grab values from the query string to fill in hidden fields in ninja forms [closed]
- Remove short link tag from particular page
- Change slug shortlink “/?p=” base in WordPress
- How do I do a redirect to WordPress permalink with post id via htaccess?
- How to remove ?p= from wordpress short links
- WordPress function and string as variable?
- How to append a query string to pagination?