Wp Login redirect strips parameters from url
I think you should encode the & to avoid potential conflicts: http://domain.com/wp-login.php?redirect_to=http://domain.com/specificpage/?parameter1=dog&parameter2=dog&parameter3=cat
I think you should encode the & to avoid potential conflicts: http://domain.com/wp-login.php?redirect_to=http://domain.com/specificpage/?parameter1=dog&parameter2=dog&parameter3=cat
$wpdb->prepare() accepts a single array of arguments as the second parameter, e.g. $wpdb->prepare( “SELECT * FROM table WHERE field1 = %s AND field2 = %d AND field3 = %s”, array( ‘foo-bar’, 123, ‘[email protected]’ ) ) Therefore you can use an array of placeholders with the SQL command (the 1st parameter), like so: // Create an … Read more
After some searching I found the parameters I needed: https://gist.github.com/luetkemj/2023628 (on Line 231) //////Search Parameter //http://codex.wordpress.org/Class_Reference/WP_Query#Search_Parameter ‘s’ => $s, //(string) – Passes along the query string variable from a search. For example usage see: http://www.wprecipes.com/how-to-display-the-number-of-results-in-wordpress-search ‘exact’ => true, //(bool) – flag to make it only match whole titles/posts – Default value is false. For more … Read more
Without knowing exactly what you are trying to do, it seems you want to append query variables to the URL. WordPress has methods for handling that properly, without manual string concatenation. Look at the documentation for add_query_arg() for details: https://developer.wordpress.org/reference/functions/add_query_arg/ You can rebuild the URL and append query variables to the URL query by using … Read more
In reply to “Update 1“: The code worked fine for me. So, I’m still getting a 404 when I go to “mypage” with anything following the pagename, like so: http://example.com/mypage/foo. Because your RegEx pattern is ^category/([^/]+)/?, so the URL you should have visited is http://example.com/category/foo. But then, you shouldn’t use category because that “base” is … Read more
Sitemap Provider It’s possible to create a so called custom sitemap provider and register it with wp_register_sitemap_provider(). It’s helpful to look at the core setup, e.g. for the WP_Sitemaps_Posts provider and also the dev notes. Basic Example – Sitemap with custom URLs Here’s a very basic example that adds the wpse provider that extends WP_Sitemaps_Provider, … Read more
query_vars Filter: Would You Ever Use It When $_GET is Available and You Don’t Need a ‘Pretty’ URL?
Showing random content / pictures from earlier posts in a sticky post?
You might want to try to use wp_localize_script() to allow your javascript to use data that are normally only available using php. Here is the link in the codex that will help you do what you need: https://codex.wordpress.org/Function_Reference/wp_localize_script Another way is to use a php to output your entire javascript code (in a php file, … Read more
You got two options. Either you filter your valid video extentions as @birgire recommended. I remember a similar issue for the audio shortcode here. There I found a workaround by allowing the empty audio extension. You could try something similar with the video extensions. Here’s a demo plugin: /** * Allow the empty video extension … Read more