Remove query string except from google map api

First of all I would like to strongly recommend you to not remove query parts of javascript and stylesheet files. Why? Because they contain a version of a file. Why do I need it for? We need to add version to each file (whenever it is possible) to prevent versions collisions. These collisions could appear … Read more

PHP $_REQUEST array empty

Missing GET request variables are sometimes a symptom of improper rewrite rules in the web-server’s configuration files. In the case of Apache, rewrites are most often implemented using the mod_rewrite module’s directives in the WordPress installation’s directory-level .htaccess configuration file – however, a faulty rewrite rule could also be present in higher-level configuration files (directory, … Read more

How would I get WordPress to parse /mypage/area/value as /mypage/?area=value?

add_rewrite_rule is very handy for this use, first add your custom rule for this: add_action(‘init’, function(){ return add_rewrite_rule( ‘([^/]+)/area/([^/]+)/?$’, ‘index.php?pagename=$matches[1]&area=$matches[2]’, ‘top’ ); }); and you already registered the custom query variable, next is (because you’re in development) go to admin > settings > permalinks and save settings to flush the rewrite rules. Now to get … Read more

How to load this code on function.php

Without any further detail (error messages, etc), we’re just guessing here. I first thought of the print_my_inline_script() function as being doubly defined, but then it looked to me like you have a <script> within a <script>. Remove the outside <script> </script> commands and see what that does.

Filter results from a serialized string to use on statistics

So basically the form saves a large serialized array in the database. Now since you have multiple forms, you need to iterate over the result from get_results, unserialize the column and then access the city key. global $wpdb; $table_name = $wpdb->prefix.’db7_forms’; $results = $wpdb->get_results( “SELECT form_value FROM $table_name WHERE form_post_id = 6062”, OBJECT ); // … Read more

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