Questions tagged [parameter]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
50 views

How to pass username in affiliate link in wordpress website

I need to pass current logged in user in wordpress website as SUBID in the affiliate link as follows. Affiliate link format is like below. https://affiliatenetwork.com/track?id=myuserid&url=https:/...
user avatar
0 votes
1 answer
33 views

Warning at top of website & top menu gone

This warning has appeared at the top of our website, and our top menu bar has disappeared: Warning: call_user_func_array) expects parameter! +~ be a valid callback, function '...
user avatar
0 votes
1 answer
45 views

Passing values through url for checkbox fields with same name to get?

Look to this images For example chose "Ajna" then select "Residential and Hotel Apartment" after click Search Properties => I need to show items that have these categories <...
user avatar
0 votes
1 answer
44 views

How to get a page url segment on wordpress?

I've created a regular wordpress page named "user" which is using a custom template. This page is supposed to be called like so: www.site.com/user/<ID> Is it possible to get the ID ...
user avatar
1 vote
1 answer
43 views

Create URL with parameter for JQuery toggle status

Inherited a theme and cannot contact the original developer. In the site, there are toggles so that users can switch between English and Spanish versions of the content. The toggle JS is included in a ...
user avatar
0 votes
0 answers
54 views

Different url to same page (with dynamic content)

I have a custom php script that in a specific page of my wordpress website is generating a dynamic content (ie. page "mysite.com/citydetail" that will load a list of places specific for that ...
user avatar
  • 11
4 votes
2 answers
101 views

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

I have a specific requirement that my referral link be as simple as possible to type in manually (customer base is very low skilled) while simultaneously referring to an employee number who was ...
user avatar
0 votes
0 answers
17 views

Accidently changed the GUID

I accidently executed: UPDATE yemnc_posts SET guid = REPLACE(post_content, 'domainA', 'domainB'); instead of UPDATE yemnc_posts SET guid = REPLACE(guid, 'domainA', 'domainB'); How can I undo this? Is ...
user avatar
  • 1
0 votes
0 answers
27 views

Unable to display multiple parameters from url by javascript through shortcodes

From our CRM I can generate URL's for customers that includes parameters. I want to use the information stored in this parameters to show dynamic content to the customers. Example: www.example.com/...
user avatar
1 vote
2 answers
228 views

Add custom parameter to REST API request of a custom post type?

I registered a custom post type called wasb_message with show_in_rest set to true and rest_base set to 'messages' so the resource is reachable at endpoint https://mydomain/wp-json/wp/v2/messages (...
user avatar
0 votes
0 answers
18 views

Parsing linked url into page and parameter for look-up

I want to use a link like so: mysite.com/image-page/fred-the-aardvark. I want it to open a page mysite.com/image-page which internally uses "aardvark" to get and echo my media attachment ...
user avatar
  • 1
1 vote
2 answers
249 views

Get value from shortcode to do something

For a project I want to use advanced shortcodes. Normally I define shortcodes within my PHP. This way it is always the information I have in my PHP-files that I show with my shortcodes (like [...
user avatar
0 votes
0 answers
40 views

Single pretty url query var parameter

I’ve registered a custom query var that I read from shortcodes running on a page ‘d’, so at the moment … [URL]/d/?v=value works. The page is essentially a template and the value is actually an author ...
user avatar
1 vote
0 answers
75 views

Rewrite custom post type URL parameters

I would like to change the following parameterized URL: www.example.com/category/?keywords=&location=new-york&type=Wedding in this way: (invert city > category) www.example.com/category/...
user avatar
0 votes
1 answer
24 views

Append a parametter at first or last to a certain URL

I want to change a URL and want to add a parameter to the last or first of that URL. For example I have URL like below https://example.com/search/?cityId=49409&bedrooms=0&bathCount=0&...
user avatar
0 votes
2 answers
32 views

Add a paramter to page url

I have a custom page template products, so i get the url site.com/products. I want to add a parameter (for example product) to this url, so that I can access this page using url site.com/products/...
user avatar
  • 1
0 votes
1 answer
611 views

How to pass parameters in wordpress shortcode?

Everything is working fine and it's displaying the comments of the current page with this shortcode [wpdiscuz_comments] using the code below. function my_wpdiscuz_shortcode() { $html = ""; ...
user avatar
  • 1
0 votes
1 answer
105 views

RTrouble passing arguments to action

I know there are several posts on this topic. I have followed many of them as well as other resources on the web and thought I had it down, but it does not seem to be working. In my case, I have 2 ...
user avatar
  • 191
0 votes
1 answer
20 views

Problem parsing long parameter in shortcode

I have created this shortcode and registered it: function product_paypal_button_display($atts){ //Make the PayPal variables available downstream. global $wpdb; global $...
user avatar
  • 191
0 votes
0 answers
15 views

Display value of the GET parameter in a new URL page

Here's what I'd like to achieve: retrieve the GET value of its parameter from http://mysite/testing/?name=302Beep store it in a cookie redirect to http://mysite/dashboard display '302Beep' in http://...
user avatar
1 vote
0 answers
24 views

Adding parameters to password reset key

I'm trying to add in parameters to the url generated for password reset for a user. In this case I wanted to add a &lang parameter to determine a users selected language and set a cookie. How do I ...
user avatar
  • 113
0 votes
2 answers
640 views

Can I pass parameters to the add_shortcode() function?

As the title states, I need to pass at least one parameter, maybe more, to the add_shortcode() function. In other words, those parameters I am passing will be used in the callback function of ...
user avatar
  • 2,014
1 vote
1 answer
82 views

404 error when passing "cat" parameter to URL

I encounter a strange problem with our WordPress site. When I check the URL: https://www.example.com/outlook-repair/ Everything is fine. When I pass several parameters to the URL, for example: https:/...
user avatar
  • 41
1 vote
0 answers
61 views

Assign category to new post via URL

There are two post categories in my WordPress site, Blog category and News category. I want to create two links in admin dashboard, each of the links will open post-new.php but a different category ...
user avatar
0 votes
1 answer
24 views

How to construct a dynamic rewrite rule for child pages that passes more than one query var

I get a 404 error parent-page/any-child-page/?var1=x&var2=y&var3=z This is what I have so far: I want to have the rule cover any child page add_rewrite_rule('^project-centers/(...
user avatar
0 votes
0 answers
330 views

What's the right way to validate JSON data coming from an AJAX POST request?

I'm building a little plugin with a send button: when clicked, the button calls (from the admin area) a rest api endpoint, passing JSON data through AJAX. Everything works very well and the callback ...
user avatar
0 votes
1 answer
22 views

Show data obtained from a function and place it in a shortocode function

I'm new I need to put a value obtained from a function and put it in my shortocode function if you can help me thanks $a=4; // value obtained from another function my_function($a); function ...
user avatar
  • 37
0 votes
1 answer
487 views

HTTP 403 Error when passing parameters to URL

Our website uses WordPress. When we visit URL https://www.datanumen.com/outlook-repair/?utm_source=adword via browser such as Chrome and FireFox, we can see everything is fine. However, Google Ads ...
user avatar
  • 41
0 votes
2 answers
582 views

Wordpress get parameter 'unapproved' and 'moderation-hash'

I have a blog site. And I found a suspicious access to my blog post from log. The url format is like this. https://example.com/my-post/?unapproved=420&moderation-hash=...
user avatar
  • 101
0 votes
0 answers
230 views

How do i fix this "call_user_func_array()" error

Please, somebody, help me out.. How do I fix this? I kept on receiving this each time I tried to register an account and create a subsite on the frontend of my WordPress multisite Warning: ...
user avatar
0 votes
0 answers
15 views

How can I pass instance via apply_filters as a parameter?

How can I pass instance via apply_filters as a parameter? $dt = new DateTime("now", new DateTimeZone($timezone_string)); $d = apply_filters( 'custom_date_format', $d, $dt ); UPDATE: It's my mistake. ...
user avatar
  • 25
1 vote
0 answers
48 views

Is there a link parameter that will show me all my published pages?

Is there any way to display a loop of all the pages that are published on my website, via a link? (Even while logged out) For example, I can type in domain.com/?s=text and that will create a post ...
user avatar
  • 201
0 votes
1 answer
135 views

wordpress automatic URL 'page' parameter rewrite

I have noticed that on my wordpress installation the page domain.com/test?page=2 is redirecting to domain.com/test/2 I tried disabling all plugins and also used the default/different themes and ...
user avatar
  • 111
0 votes
0 answers
76 views

Add more than one query parameter onto wordpress url

As soon as someone clicks on an anchor tag in my website, I was planning to redirect to the same page containing the information added via two URL query parameters, and then access them with the $_GET ...
user avatar
  • 35
0 votes
0 answers
15 views

When calling a function with admin-ajax.php, what is the first parameter? [duplicate]

I'm trying to make a function that can either be called directly or via admin-ajax.php. Strangely, when calling it as an AJAX function, the first parameter's value is a blank string. function ...
user avatar
0 votes
1 answer
49 views

How to ignore GET parameter that’s the same as a CPT slug?

I have a custom post type called newsletter. At the same time, an implemented analytics tool (not related to my CPT) uses newsletter as a GET parameter to track some incoming links (and I can’t change ...
user avatar
0 votes
1 answer
16 views

Get posts from year from URL

I've created a page that shows content from a specific year. The year will be defined in the url. Example url: https://mpdb.space/stats/tour/?year=2019 It works perfectly when I type year=2019 but ...
user avatar
  • 125
0 votes
1 answer
44 views

Post title as link parameter

I have in the theme file single.php a link in it (example.com/cars/?aff=) in each post of my blog is displayed. That's how I integrated it: $html .="<a id='test' rel='nofollow' href='https://...
user avatar
  • 1
3 votes
2 answers
724 views

Why does WordPress automatically redirect URLs with the parameter "name=" to a different page?

How do I disable this automatic redirect of the name variable so that I can use it on my call booking landing page? I'm setting up a call booking page here: https://www.themcmethod.com/talk/ I want ...
user avatar
0 votes
1 answer
847 views

Add a class with body_class to a specific url with parameter

i try to add a class to the body for a specific page/url, which has a parameter at the end. the url looks like this: https://sample-site.com/user/37/?um_action=edit with my code, the class is also ...
user avatar
0 votes
1 answer
438 views

unique post in "$args" of wp_query display more than one post

I can't find the rights arguments to display only one post of a category when I click on a div. I call the post with Ajax and I display it in a div popup.Perhaps these arguments are not sufficient, or ...
user avatar
0 votes
1 answer
122 views

add_action with associative array

I am trying to get these parameters from the do_action placed inside body: do_action( 'custom_action', array( 'product_id' => $product_id , 'outbiddeduser_id' => $outbiddeduser, 'log_id' =>...
user avatar
  • 155
0 votes
1 answer
10k views

Set A Cookie To URL Parameter, Pass Cookie From Page To Page To Alter Post

I have a function that makes the post multipage based on a URL Parameter with a specific value: ?content=multipage The problem is that when a user clicks to the next page the URL parameter is ...
user avatar
0 votes
1 answer
104 views

Set URL Parameter Post Layout As Default

I have 2 urls: www.site.com/post1/ www.site.com/post1/?content=onepage I have the following function that controls the layout of the post through the URL parameters in BOLD: www.site.com/post1/?...
user avatar
0 votes
1 answer
787 views

How to pass username in url

I have several author page like mysite.com/author/username1 mysite.com/author/username2 I want to create a dynamic url like mysite.com/author/current_loggedin_username How to create this.
user avatar
0 votes
0 answers
1k views

Url parameter going to 404 not found

I am trying to get data from url query in my woocommerce website. But when I go to the link it redirects to 404 not found. If I remove the 'product' from the query and add something else it works fine....
user avatar
2 votes
1 answer
4k views

Can we access the REST request parameters from within the permission_callback to enforce a 401 by returning false?

From what I have tried and tested so far, the getters and setters do not work inside the function permission_callback. The alternate way would be to throw a custom 401 from the callback itself. Is ...
user avatar
0 votes
1 answer
678 views

Handle multiple parameters in filter

I am trying to setup a filter which supports more than one parameter: function FILTER_CALLBACK($block_id, array $items) { // How can I pass both parameters to the next hook? return $items; } ...
user avatar
0 votes
2 answers
202 views

How to use query string in URL to display content on the wordpress page

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 ...
user avatar
  • 3
0 votes
0 answers
38 views

Add a url parameter to the current post and read it in a shortcode

I am trying to add a parameter to the currently visited url but it doesn't work. I've tried query_vars, pre_get_posts, post, post_link, page_link,post_type_link.... None of this work... How can I ...
user avatar