30 questions
0
votes
0
answers
285
views
Trouble with Custom Rewrite Rules in WordPress for Post Types and Categories
I'm working on a WordPress project where I need to create custom rewrite rules for various post types and their associated categories. The goal is to rewrite URLs in the format /post-type-slug/...
0
votes
1
answer
5k
views
How to use Grafana query variables in KQL log queries In Grafana
I'm working with Grafana and using KQL for log queries. I want to incorporate Grafana query variables into my KQL queries to make them more flexible and interactive. However, I'm facing challenges in ...
2
votes
1
answer
222
views
Matching a path with query variables in React
Assume I have the following pages on my website
Page 1: example.com/somepage.php?action=a
Page 2: example.com/somepage.php?action=b
Page 3: example.com/somepage.php?action=b&other=c
IMPORTANT ...
0
votes
1
answer
673
views
Using variables for schema and table names in a Redshift query
I want to be able to use the variable names in Redshift which refers to my DB Objects (like schema and table names). Something like...
SET my_schema="schema":
SET my_table="table";
...
0
votes
0
answers
16
views
CONVERT @scalar variable SQL Server to Postgres/pgAdmin [duplicate]
I have SQL Server script that has scalar variable that can be used in single execution scripts
Just want to ask is there any way I can declare scalar variable like in PostgreSQL.
See sample code below:...
4
votes
1
answer
811
views
Issues when using WordPress rewrite rules then accessing parameter using get_query_var
I'm developing a WP plugin and have a WordPress URL:
(e.g.: http://localhost/testsite1/coder/?id=66),
and have attempted to add a rewrite rule to
http://localhost/testsite1/coder/66/
using the ...
1
vote
1
answer
7k
views
Wordpress how to access a custom query variable from the url [duplicate]
I have the url http://localhost/testsite1/coder2/?id=71 with parameter id=71.
As i am developing in WordPress I cannot use $_GET['id'] and so need to use get_query_var('id') to access the parameter.
...
0
votes
1
answer
365
views
Cannot make a request to the GraphQL with the wrapper in QueryVariables
I am trying to make a request to GraphQl. I can do it in the playground.
Request in the playground
When I try to make a request using flutter, I cannot make a wrapper LogIn in Query variables.
This is ...
1
vote
1
answer
396
views
Wordpress how to use a second form that only searches for posts?
I have two forms on my wordpress site, search.blade.php and blog-search.blade.php.
search.blade.php is in the header of the site, and searches all content types.
blog-search.blade.php is meant to only ...
1
vote
1
answer
2k
views
Wordpress sorting posts by date and title using a dropdown
I'm trying to set up a drop-down that would sort my posts by Newest to oldest and Alphabetical.
This is what I have so far:
I'm declaring an empty variable, then a form where I can change the contents ...
0
votes
2
answers
71
views
How to refactor this Wordpress query?
I am using query_vars in my function.php to get some data in my URL after a form is submitted. This is all working fine, however I feel like the code can be improved a lot, but I'm not sure how to ...
8
votes
4
answers
18k
views
Getting current page url on wp-admin/admin dashboard?
Im trying to get the current page url while on the wp-admin/admin dashboard, is it possible?
Im trying to use these codes but i can't seem to get it to work.
global $wp;
$current_page = add_query_arg( ...
2
votes
1
answer
7k
views
Get orders by meta data via WooCommerce WC_Order_Query
How can I get a WooCommerce order by its number (instead of its ID)?
I tried using wc_get_orders with custom args, like:
wc_get_orders( array( 'number' => '1000' ) );
But it doesn't seem to work.
...
0
votes
0
answers
58
views
Import access db in excel using a query with variables
I have an issue trying to import access db through a query , but using variables
variables are macroWB and cust
macroWB refers to filepath
cust refers to selected customer name
VBA code works with ...
0
votes
0
answers
439
views
Dynamic meta_query depending on query var paramters in url Wordpress custom post type
In my custom post type i want to filter depending on the parameters in the url. For example ?car=yellow&foo=1 refer to meta query key and value. The key and value's are the extra fields. What ...
1
vote
1
answer
1k
views
Wordpress pagination: get current page ('paged' query_var) from single page URL/template
I have an issue trying to get the current page from WP pagination. Here is my code:
global $wp_query;
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
var_dump(...
1
vote
2
answers
2k
views
SQL pass variable to subquery
I can't pass variable to subquery.
I have 2 different tables where need get all interview persons.
Current my SQL
SELECT
empl.id AS id,
(SELECT
GROUP_CONCAT(interviewed_by SEPARATOR ...
0
votes
1
answer
114
views
Unable to save Query Vars with a post
I'm trying to save Query Vars to a post for later retrieval.
I'm using permalinks in this format: domain.com/%category%/%postname%/
Example:
I create a following page
domain.com/page-003/
I add ...
2
votes
0
answers
345
views
Wordpress Custom Query Vars with pretty permalinks
I've been wracking my brain with this problem for the past couple of days, looking over all the potential solutions with no success.
Here's what I'm trying to do. I want to create an SEO friendly ...
2
votes
1
answer
3k
views
Wordpress: Required Multiple Slugs for a single page (Not custom post)
I am creating a plugin. I want to pass parameters in URL or you can say I want multiple URLs for same page(But this will load same page Not a Redirect).
For example:
http://www.ijmsbr.boxysolutions....
0
votes
1
answer
1k
views
How to pass custom variable as URL parameter in WordPress
We have started appending fairly simple custom parameters onto the url of our website to track marketing sources. An example might be www.example.com?campaign=facebook&device=mobile.
Problem is,...
0
votes
1
answer
360
views
MySQL - Getting results on a range by column value
Solution B
As I accepted @Strawberry answer and this solution is out of the question of the post itself, I won't write it as an answer, but leave it here to anyone to whom it may be useful.
The main ...
-1
votes
1
answer
168
views
How to redirect Urls with variables to the main domain using htaccess
Using .htaccess, I have tried some things to redirect Urls with variables to main the domain www.my_domain.tld, but I didn't find the right way.
I have 2 kinds of Urls that I want to redirect to my ...
0
votes
0
answers
46
views
Wordpress: How does a plugin generate a page?
Could someone please solve a beginner's crisis for me? I simply CANNOT figure out how a plugin generates a page or even multiple pages without making a page template in the dashboard. I have read ...
5
votes
2
answers
337
views
WordPress query_var by domain
I'd like to add a query variable to all queries coming from a certain domain.
For example, mydomain.com and proxydomain.com both show the same WordPress site, but for users visiting via proxydomain....
0
votes
1
answer
114
views
Create 2 Wordpress Post Type Templates
I have made a template for my post type, this works great. However I want similar duplication with certain parts of the original.
I have an ajax call using jQuery $.get, I want to target the second ...
0
votes
1
answer
75
views
Backbone - how to maintain state in my case
I've read a lot of threads here but can't find a real answer.
I'm building a desktop app that first loads a lot of json records (let's call them "cards"). Then the user can filter them down with by ...
6
votes
1
answer
7k
views
How do I escape the colon (:) in a mysql query over jdbc that contains a variable assignment?
I'm trying to run a query that involves a custom variable over JDBC toward a MySQL 5.0 database (Hibernate 4 as the ORM):
SET @rownum := 0; SELECT rnum FROM (
SELECT (@rownum := @rownum + 1) AS ...
7
votes
1
answer
1k
views
SELECT with query variables not using INDEXes
I was playing around (out of interest) with retrieving a tree of nodes in a simple adjacency list with a recursive query using local variables.
The solution i have so far is fun but i wonder (and ...
13
votes
4
answers
60k
views
Query with variables
Is it possible to set/read variables from within the query?
pseudo code:
SELECT animal_name,
@tallest_animal = (select top 1 height from animal order by height desc) as tallest,
@...