Pass additional parameter in the URL

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

Order & Orderby Parameters

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

Dynamically change page title from URL param

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