Pretty Permalinks

You should add your own custom query variable first: function add_search_store_query_var($vars) { $vars[] = ‘search_store’; return $vars; } add_filter( ‘query_vars’, ‘add_search_store_query_var’); And then add rewrite rule: function add_search_store_rewrite_rule() { add_rewrite_rule(‘stores/([^/]+)$’, ‘index.php?page_id=<YOUR SEARCH PAGE ID>&search_store=$matches[1]’, ‘top’); } add_action(‘init’, ‘add_search_store_rewrite_rule’); You can then use get_query_var(‘search_store’); to get search term. Just remember to flush rewrite rules, before you … Read more

Bulk Delete Users Error uri too large

I would shy away from trying to do this is SQL. It is possible but probably not necessary and is more prone to error that using WordPress Core functions. You could use get_users() or WP_User_Query to retrieve your users but given that you only want to keep two users and you only need the ID … Read more

Run WordPress frontend and backend in different domains

There’s no need to do it the way you mean. There are ways to host multiple SSL websites on a single domain both with Apache and Nginx, and it’s much easier to implement than your idea. Check out these tutorials: https://www.digitalocean.com/community/tutorials/how-to-set-up-multiple-ssl-certificates-on-one-ip-with-apache-on-ubuntu-12-04 https://www.digitalocean.com/community/tutorials/how-to-set-up-multiple-ssl-certificates-on-one-ip-with-nginx-on-ubuntu-12-04

URL for custom post type

….if you are planning to have many entries (say – over 100), you will run into memory issue Any hierarchical post type (even the build-in post type page) have this issue where a large amount of posts created have a huge impact on performance. This issue is experienced in the back end, and not in … Read more

How to remove /index.php/ from URL’s

This is usually a permalink issue. Go to your WordPress dashboard then look for Settings>Permalinks. There will be radial selectable options. You can select any that have no mention of index.php. Alternative select Custom Structure then in the field to the right insert /%monthnum%/%day%/%year%/%postname%/ then save with the button at the bottom of the page. … Read more

Pulling a parameter out of the URL of a WP link without “?” or being sent to a different page

Supposing you have a page created with the slug “referral”, you can add another segment to the page URL containing the employee ref number like this: 1- Register a new query variable e.g “employee_ref” add_filter(‘query_vars’, function ($query_vars){ $query_vars[] = ’employee_ref’; return $query_vars; }); 2- Using add_rewrite_rule function, add a new rule for the ’employee_ref’ to … Read more

URL Rewrite + Page + Custom Post Type = Unusual Redirect

You should try setting ‘slug’ ( in the ‘rewrite’ parameter/option) to ‘our-firm/shareholders’, just like the structure you have set in the add_rewrite_rule() function. The first parameter of add_rewrite_rule() and the ‘rewrite’ setting of the custom post type must be equal in order to get the rewritting actually working. So, in case you choose coding the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)