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
- What is the difference between URL parameters and query strings?
- How to get GET (query string) variables in Express.js on Node.js?
- 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
- 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
- Prevent redirect to page/page when reserved term ‘name’ in $_POST when value is a page/post title
- 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
- 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
- How to order results by date and meta key?
- 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?
- Can’t add external rewrites
- How to remove query string from static resource in WordPress?
- 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!
- 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]
- 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
- Short URL in content
- 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]
- 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?
- Is there a query string for edit.php to show all posts that have no custom taxonomy terms?
- Replacing the WP.me URL shortener with Bit.ly
- How to translate “$before” with get text in get_the_term_list?
- How to grab query string from wp-content/uploads/.*
- Querystring value being stripped from site_url()
- How to Include Fields in Query String When Making Request of WordPress.org Plugin API?
- Filter results from a serialized string to use on statistics
- How to load this code on function.php
- How would I get WordPress to parse /mypage/area/value as /mypage/?area=value?
- PHP $_REQUEST array empty
- WP adds long version query strings to CSS and JS files
- linking to post outside the loop
- Add rewrite rule to make Woocommerce product category page seo friendly
- Shortlinks work only for logged in users
- Taxonomy archive uses incorrect template when query strings are used
- Query String Filtering API
- Site using static homepage, redirects (301) and removes pluses from query string
- dynamic page not displaying correctly when Varnish hosting ignores query string parameters
- Custom Rewrite Rule Removing Query String
- Display plugin-generated content to override a placeholder page
- problem in using wpdb->prepare and a string placeholder
- Active state does not work with the query string in the url
- Get (eventual) permalink from post within Edit Post in Admin panel
- Blog switch wpml string translation (multi-site)
- How to replace part of shortlink with nothing
- How do you detect if a specific word is at the end of a the_title()
- WordPress loop based on url sting
- Using query string on edit CPT page
- WordPress Page Template: Comment Filtering with Querystring
- How to use query string in URL to display content on the wordpress page
- How to display search query as formatted text?
- query posts only works on the first page
- append $_GET parameters to post
- query_vars doesn’t return query string (trying to get data from $wpdb)
- WordPress creates shortlinks for each page and post