Skip to main content

Questions tagged [query-string]

Filter by
Sorted by
Tagged with
1 vote
2 answers
3k views

I would like to get the query parameters passed via the URL on a WordPress site. Very easy, I've never had a problem before. According to the address bar and dev tools my request URL is: https://...
Mitchell Bennett's user avatar
-1 votes
1 answer
965 views

I have migrated an older site to WordPress and need to keep all legacy URLs. I am using a plugin called Custom Permalinks for that purpose, which works well, except for one thing: it strips all "...
Dave's user avatar
  • 119
0 votes
1 answer
158 views

I have a ref query string which matches rows in my wp_invites table. In my wp_invites table, I have the following columns: lead_name reference Let's assume here is one of the rows: Lead name: ...
Freddy's user avatar
  • 177
5 votes
1 answer
1k views

I have seen various ways to schedule the WordPress cron so that it is triggered by the server. Some will run the php file directory from the crontab and others will use a wget and reference the url. I ...
Mark Hunter's user avatar
0 votes
1 answer
2k views

I have created a store/franchise locator page here. Once users click "Contact Franchise" on the locator, the franchise name is passed to the form underneath. The query string looks like this ...
Esme  June's user avatar
0 votes
1 answer
170 views

I've written a quick little plugin to grab some custom query_vars, do some manipulation, and store the output in a CSV file. It works great for pages and posts, but ... it seems that queries to wp-...
philolegein's user avatar
3 votes
1 answer
2k views

My WordPress site also incorporates some external non-WP content that is dynamically pulled into the page via shortcode. The content shown depends on a query string parameter. So from WP's point of ...
equin0x80's user avatar
  • 153
2 votes
1 answer
1k views

I have an issue with passing an array of strings to a SQL statement in a WordPress plugin, because the prepare method adds a backslash before each apostrophe. // I have an array of strings. $the_array ...
Ramona Morea's user avatar
0 votes
1 answer
235 views

I’m trying to auto-populate a form using url parameters (query strings). The problem is when I use the “name” query string (eg mysite.com/?name=xyz), it is referring to the pagename instead of the ...
davidvishal's user avatar
3 votes
0 answers
228 views

In the Wordpress Admin 'Reading Settings' under the 'Your home page displays' option, when a static page is selected as Homepage, it appears that any query string with special characters added to the ...
Sam Zhu's user avatar
  • 31
0 votes
0 answers
534 views

I'm using the WooCommerce REST API to search products by string. Quick question: Is it possible to limit the REST API query ?search= to products names ? Currently it also searches the string in the ...
JAGENI Nat's user avatar
1 vote
1 answer
217 views

I created simple custom WordPress plugin for a client in 2016 that simply displays a paginated list of results queried from a custom table. try { $recordcountquery = 'SELECT FName,...
Andrew's user avatar
  • 113
0 votes
0 answers
63 views

It seems as though all WordPress sites that I’m supporting for various clients has this same functionality — if the site is using a static homepage, and you visit the homepage with a query string ...
kevindeleon's user avatar
0 votes
1 answer
721 views

I have a WP site with managed hosting that uses Varnish. I have a landing page that displays the appropriate images based on a couple arguments passed through the query string. So for example, ...
Daveh0's user avatar
  • 191
0 votes
2 answers
2k views

I'm trying (and failing) to use rewrite rules to redirect shorter/prettier URLs to the right page AND include values in the query string. WP is installed at https://example.com, and the plugin creates ...
appshine's user avatar
0 votes
1 answer
405 views

This question is about a very specific circumstance. The site has one template file that can run a default category query with thumbnail, linked title and excerpt, or it can run a linked title only ...
Nora McDougall-Collins's user avatar
1 vote
1 answer
207 views

I'm very new to Wordpress, so apologies. I have a project that I'm working on and I'm hoping someone could point me in the right direction. To start off I am volunteering to do some work for a small ...
Bruno's user avatar
  • 11
2 votes
2 answers
756 views

I have a query string added to some urls which isn't pretty: ?city=Amsterdam So i'd like to structure the url like: https://example.com/realpage1/realpage2/amsterdam/ or https://example.com/realpage1/...
Peps's user avatar
  • 53
0 votes
1 answer
635 views

This is a question about a plugin. A form to search the database works. What I am trying to do is have the search term reload into the form input field when returning search results. The problem is ...
Steve's user avatar
  • 299
0 votes
1 answer
651 views

I have a Projects page where I use query strings to deep-link to different categories using JavaScript. For example if my URL is www.mysite.com/projects/?theme=blue then I read this query string in ...
Gavin's user avatar
  • 434
0 votes
0 answers
41 views

I am building a plugin, but despite several search parameters, I cannot figure out how to replace a page's content with custom content generated by my plugin. I have already written several ...
Prdufresne's user avatar
0 votes
2 answers
442 views

My wordpress page URL is like this https:www.com/thanks-page/?origin_name=Sydney&origin_iata=SYD&destination_name=Ahmedabad&destination_iata=AMD I need to display SYD and AMD in to the ...
Rakesh's user avatar
  • 3
3 votes
1 answer
341 views

Working on a plugin that creates short codes to embed into a page. I have permalinks set to "Post name", so http://example.com/post-name/ I want to be able to pass additional information in the URL ...
Craig Jacobs's user avatar
0 votes
1 answer
131 views

i am using a function (maav_portfolio_infinite_loading) to load more custom posts on a page via ajax. I want to be able to load only from a specific category that i can set it on the main portfolio ...
mThemes Net's user avatar
1 vote
1 answer
612 views

Let's say I'm using wp_localize_script to pass base REST url to my script in a Wordpress plugin: wp_register_script( 'my-plugin', plugin_dir_url( __FILE__ ) . '../dist/admin-main.js', [], '0.9.2' ); ...
Filip Růžička's user avatar
2 votes
1 answer
353 views

I’m fairly new to wordpress and all my previous sites have been in .asp or raw .php. and although I can tinker I’m no developer and due to time constraints I was hoping this would be an easy fix - but ...
Fozzy279's user avatar
0 votes
0 answers
693 views

I have added to my child theme functions.php: function mychildtheme_register_query_vars( $vars ) { $vars[] = 'papers'; return $vars; } add_filter( 'query_vars', '...
Det's user avatar
  • 1
1 vote
3 answers
19k views

I am looking to replace a few text strings for only two specific pages on a wordpress site. It should not affect those strings on any other pages. I'd prefer to do this via adding some code to ...
user136330's user avatar
1 vote
1 answer
464 views

I have this type of query string, Like: https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js?ba0a5a&ba0a5a https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js?...
Rakesh Patidar's user avatar
0 votes
0 answers
286 views

I am using a dynamic field in Gravity forms which is pre-populated via a query string from another page. https://www.domain.com/example?country=US I have a function where I would like to get the ...
JoaMika's user avatar
  • 698
2 votes
3 answers
5k views

I'm trying to concatenate my site_url and a string, but it doesn't work. This is what I'm doing: $myurl = site_url(); var_dump($myurl); $url = "https" . $myurl . "/inbox/?fepaction=viewmessage&...
nielsv's user avatar
  • 173
1 vote
1 answer
1k views

Not sure if I titled it correctly but here is what I'm trying to do. What it's doing: User comes to my website with a campaign query string appended to the url like www.mywebsite.com?name=myName. I ...
feedmeimhungry's user avatar
7 votes
2 answers
5k views

My generated paginate link results will have additional #038; in the url, may I know how to get rid of it? Blog page url : http://localhost/wordpress/blog/ I had already setup pagination with ...
Mavichow's user avatar
  • 189
0 votes
1 answer
101 views

I am running a query against the WordPress.org Plugin API that looks like this went built: https://api.wordpress.org/plugins/info/1.1/?action=query_plugins&request[per_page]=10&request[...
davemackey's user avatar
1 vote
2 answers
701 views

I have a simple database query script alongside with my WordPress installation, to which I pass a parameter using the following URL: http://example.com/db/?p=foo. My database script reads the ...
nounours's user avatar
1 vote
1 answer
967 views

I need to build a landing page from which I can grab a token from a query-string in the URL. I would therefore like to create a shortcode which can achieve this. I have found a plugin which can grab ...
flemmingha's user avatar
4 votes
1 answer
36k views

I am trying to get a custom URL parameter from a URL in WordPress. I add the following code to functions.php: function add_query_vars_filter( $vars ){ $vars[] = "token"; return $vars;...
flemmingha's user avatar
1 vote
1 answer
2k views

I'm adding multiple values of the same key as a query string with add_query_arg function to filter products. The problem is that i want to remove only the value of the link clicked instead of the ...
Gabriel Souza's user avatar
1 vote
1 answer
405 views

I've made a WordPress site. Before, I had a coded site in HTML. My new WordPress site is still in maintenance mode. But, I want to insert a PHP code above all the website content. This is my code: &...
Luuk F.'s user avatar
  • 13
0 votes
1 answer
2k views

I have a pb using wpdb->prepare and string placeholders. If I do: $sql = $wpdb->prepare("SELECT * FROM %s AS T1 LEFT JOIN $table_users AS T2 ON T1.id_assure = T2.ID WHERE T1.id = %d",$...
Pierre's user avatar
  • 69
2 votes
2 answers
7k views

If i write http://domain.com/wp-login.php?redirect_to=http://domain.com/specificpage/?parameter1=dog&parameter2=dog&parameter3=cat in the url address bar (to make the login page redirect to a ...
Nori's user avatar
  • 35
2 votes
2 answers
229 views

i have created a meta box oembed with clone: function media( $meta_boxes ) { $prefix = ''; $meta_boxes[] = array( 'id' => 'media_1', 'title' => esc_html__( 'Media', '...
Phaidonas Gialis's user avatar
0 votes
1 answer
3k views

There are several ways I have seen this question worded, so I tried to make mine generic. Let's say I go to this page: example.com/page/?utm_source=test&s=test&page=12 get_query_var('...
adam rowe's user avatar
  • 161
0 votes
0 answers
243 views

I have couple of pages on the website Home and Open Positions. The problem is in the navigation menu, active class is not applied to the page if any query string is supplied to the page. For instance,...
Ghazanfar Mir's user avatar
0 votes
1 answer
2k views

I have code for custom post type, for custom taxonomy for displaying category posts. I am using Advanced Custom Fields What I want is to order posts by custom field value, and I was wondering how I ...
David's user avatar
  • 87
0 votes
0 answers
181 views

i need to add a new condition to this query: $querystr = " SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE post_id IN( SELECT DISTINCT wpostmeta.post_id ...
Caponi Elia's user avatar
0 votes
2 answers
1k views

I have a search that works fine with custom fields, and one term per taxonomy. However I want to select multiple terms from one taxonomy "property-type". My current query looks like --- /?s=Search&...
730wavy's user avatar
  • 193
0 votes
1 answer
1k views

This is the whole code actually → <script> jQuery.noConflict(); jQuery(document).ready(function() { jQuery('#mailchimp_submit-<?...
WordCent's user avatar
  • 1,964
3 votes
1 answer
4k views

I have a query that looks like: query_posts($query_string."&post_type=attachment&posts_per_page=9&paged=".$paged); I'd like it to looks something like: $args = array( 'paged' => $...
joshmrodg's user avatar
  • 1,173
0 votes
1 answer
2k views

I need to get the values from a serialized string, to use it on some statistics. I already got that info in other pages to show some content, but I have no idea why I'm having this problem now. The ...
Marcelo Henriques Cortez's user avatar