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
I’ve created a reduced test case that demonstrates that what you want to do is achievable: add_action( ‘rest_api_init’, function() { register_rest_route( ‘wpse/343039’, ‘route’, [ ‘methods’ => [ ‘POST’ ], ‘permission_callback’ => function( WP_REST_Request $request ) { if ( ‘1’ == $request->get_param( ‘param’ ) ) { return true; } else { return false; } }, ‘callback’ … Read more
Basically every filter has to be registered in the original function code (since a filter is just a way you can overwrite what is happening in the default function). So before you can attach your custom function to a filter using add_filter() the filter has to be registered before with apply_filters() (there are other functions … Read more
Edited Jul, 07 2014 at 6:28 There are a lot of gotchas with your approach. It will not work if there are any custom rewrite rule, it (probably) will not work if server is IIS and pretty permalink are active, it will not work for custom post types, it will not work for archive or … Read more
You don’t have to mess with .htaccess since WordPress has it’s own rewrite engine builti in. You are looking for this: https://codex.wordpress.org/Rewrite_API/add_rewrite_rule
You should add a filter on oembed provider to allow customs parameters: add_filter( ‘oembed_fetch_url’, ‘my_oembed_fetch_url’, 10, 3 ); function my_oembed_fetch_url( $provider, $url, $args ) { // You can find the list of defaults providers in WP_oEmbed::__construct() if ( strpos( $provider, ‘vimeo.com’ ) !== false) { // Check the full list of args here: https://developer.vimeo.com/apis/oembed if … Read more
Take out the var_dump. That is debugging code, it’s dumping the variable so that you can see what it is. Edit: Okay, I think you’re asking the wrong question here, as did the other person in the question that you linked to. Adding additional query args onto the URL being sent to wp_ombed_url() won’t cause … Read more
Add attribute to existing Shortcode
Well, I found the solution. It seems that, when applying a rewrite rule on a custom post type post, one needs to tell WP the custom post type’s name within the rewrite rule itself. Here’s the code that does NOT work (redirects and drops parameter variables instead of rewrite): function add_rewrite_rules($rules) { $newrules = array(‘cpt-slug/([^/]+)/([^/]+)/?$’ … Read more
Two points: Your rule isn’t particularly specific. For numeric matches you should be specific about it and specify a) digits and b) how many digits. Year would be ([0-9]{4}), month/day would be ([0-9]{1,2}). You can’t do it with one rule. Add three separate rules instead. add_rewrite_rule( ‘whats-on/([0-9]{4})/?$’, ‘index.php?page_id=71&event_year=$matches[1]’,’top’); add_rewrite_rule( ‘whats-on/([0-9]{4})/([0-9]{1,2})/?$’, ‘index.php?page_id=71&event_year=$matches[1]&event_month=$matches[2]’,’top’); add_rewrite_rule( ‘whats-on/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$’, ‘index.php?page_id=71&event_year=$matches[1]&event_month=$matches[2]&event_day=$matches[3]’,’top’);