404 error when passing “cat” parameter to URL
Probably WordPress gets “cat” as a category query and tries to load it. Tested in a project of mine and I also get a 404 error.
Probably WordPress gets “cat” as a category query and tries to load it. Tested in a project of mine and I also get a 404 error.
Adding parameters to password reset key
Rewrite custom post type URL parameters
I think Shortcodes with Parameters is what you’re looking for. https://developer.wordpress.org/plugins/shortcodes/shortcodes-with-parameters/
Better Answer: session_start(); $lead = $_GET[‘lead’]; $_SESSION[‘lead’] = $lead; Then, create an additional field on the form, with the input hidden. For the value, I would echo out the $_SESSION, with a name that is easy to grab (lead works). then, wherever the form is processed, just add a line to grab the lead, and … Read more
The init action… is one of many WordPress core action hooks. Hence it does not require, i.e. should not be accompanied by, a manual do_action call. You only need to manually run do_action for custom, previously non-existent, action hooks. Further, init is not the action which you want to hook the script enqueuing with. There … Read more
There is a wordpress function for adding $_GET-Params to an URL: add_query_arg(). It works like this: $link = add_query_arg( array(‘pagenum’ => $your_page_number) ); By default it adds the param to the current page (gets content from $_SERVER[REQUEST_URI]) but you can also pass an optional param to the function if you want the link to go … Read more
Shortcodes are inconvenient for such things, because they are processed in content, way after site’s header. However since you don’t need to deal with styles, only a script, it’s a little easier by moving stuff to footer. Your logic would be something like following: Locale shortcode stores requested locale in some way. At some point … Read more
Hi for me fast solution is to use custom query for eg. $sql=”SELECT `wp_users`.`ID` , `wp_users`.`user_login` , `wp_users`.`user_pass` , `wp_users`.`user_nicename` , `wp_users`.`user_email` , `wp_users`.`user_url` , `wp_users`.`user_registered` , `wp_users`.`user_activation_key` , `wp_users`.`user_status` , `wp_users`.`display_name` , `wp_posts`.`post_date` FROM `wp_users` LEFT JOIN `wp_posts` ON (`wp_users`.`ID` = `wp_posts`.`post_author`) GROUP BY `wp_users`.`ID` ORDER BY `wp_posts`.`post_date` DESC;”; global $wpdb; $results=$wpdb->get_results($sql); foreach($results as … Read more
You could do something like this in your header.php file (or where ever you are setting your page titles in your templates) <?php if (isset($_GET[‘user’])) : ?> <title>Entries from <?php echo(htmlspecialchars($_GET[‘user’], ENT_QUOTES)) ?></title> <?php else: ?> <title>Normal page title here</title> <?php endif; ?> Without more info on what plugin you are using, or how your … Read more