Questions tagged [parameter]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Confirm order page parameter for woocommerce

I have custom payment button i put on woocommerce checkout page before confirm order page, and it will redirect to confirm order page after the payment have been made. The url look something like this ...
0
votes
2answers
17 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 ...
0
votes
0answers
8 views

can't get url parameters working with metadata for searching posts

I am trying to get a custom feild added as a search paramter url. my post metadata for this example is 'public_paywall' and want to register as it as a query var "access" This is the code I ...
0
votes
0answers
14 views

Login Redirect Based on Action Parameter in Login URL

I'm trying to redirect logged in users to a specific page based on what is in the login url. For instance, I have added an action parameter to the login url like this: https://mywebsite.com/wp-login....
1
vote
1answer
22 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:/...
1
vote
0answers
31 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 ...
0
votes
1answer
13 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/(...
0
votes
0answers
30 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 ...
0
votes
1answer
18 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 ...
0
votes
1answer
196 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 ...
0
votes
1answer
128 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=...
0
votes
0answers
27 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: ...
0
votes
0answers
11 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. ...
1
vote
0answers
31 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 ...
0
votes
1answer
50 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 ...
0
votes
0answers
138 views

Setting a custom post type default category(taxonomy term) using parameters

I multiple custom post types and I would like to set a default category that can be set from one function through parameters. I initially did this for one custom post type and was hardcoded but I ...
0
votes
0answers
48 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 ...
0
votes
0answers
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 ...
0
votes
1answer
34 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 ...
0
votes
0answers
138 views

Customizing the oEmbed field to loop and disable up next queue for dailymotion video

Hey I am using cpt and ACF. I have an oEmbed field in which I want to loop video and disable relate video (up next queue for dailymotion )for which I have this code ---- `?php the_field('video_embedd')...
0
votes
1answer
9 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 ...
0
votes
1answer
26 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://...
3
votes
2answers
436 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 ...
0
votes
0answers
35 views

How can i achieve {admin_email} in wordpress?

I have seen this feature on Yoast SEO and some Email templates. I am writing some templates for my project and i was asking myself, how do achieve this and what the name of this is? {admin_email}
0
votes
1answer
243 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 ...
0
votes
1answer
150 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 ...
0
votes
1answer
38 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' =>...
0
votes
1answer
3k 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 ...
0
votes
1answer
46 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/?...
0
votes
1answer
143 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.
0
votes
0answers
323 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....
0
votes
1answer
1k 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 ...
0
votes
1answer
238 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; } ...
0
votes
2answers
71 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 ...
0
votes
0answers
31 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 ...
0
votes
0answers
443 views

How Can I Display the Last Modified Date for User Profiles on WordPress?

I'm trying to add a "last modified" date to user profiles on WordPress. I'm using the Ultimate Member plugin, so I would prefer to to find a way to save this date to a meta-key that I can pull when I ...
0
votes
2answers
19 views

Add addtional page parameter before loading the page

the problem I got: I need to force a list view for products which are shown on a specific page only for mobile devices, for me the perfect solution would be an additional url parameter -> '&...
1
vote
1answer
54 views

How to Use Parameters with a Do_Action Function Within PHP Tags

I'm using a WordPress plugin that allows integration actions to integrate it within a theme. Using GeneratePress' Elements feature, I'm adding the action as a hook. Currently the code I'm using is: &...
0
votes
3answers
1k views

Custom HTML title based on URL parameter

Basically, we have alot of traffic coming to our site from different sources looking for slightly different things. But instead of creating new pages for each slight change in heading, we were ...
1
vote
1answer
875 views

Changing WP_Query params with url Query Var

:) I've used WP_Query to display there posts (travels) here http://boost19.delavec.si/wordpressP/produkti/ So... I've got this WP_Query that is looping through my custom posts <?php $paged = (...
0
votes
0answers
181 views

Add attribute to existing Shortcode

I have an existing shortcode (from a plugin) and I would like to add a new attribute or parameter to this shortcode. The shortcode looks like this: [my_shortcode_from_plugin_xyz posts="5" autoplay="...
0
votes
1answer
168 views

Is it possible to change a shortcode parameter based on a media query?

I'm using a show/hide plugin that has shortcode with a parameter with state="open" or state = "closed" I would like to have it open on desktop but closed on mobile. Is it possible to change this ...
0
votes
1answer
48 views

How do I rewrite URL that has custom parameter

I'm stuck on rewriting my url. been searching for days hacking code together but to no avail - So looking for help now. My url is: https://domainname.com/topic/ux-process/?type=newsletter I want ...
1
vote
1answer
508 views

Pass GET params to URL from a main menu item

I have a booking form on page "Training" and I want it to be pre-filled with logged in user's details. For that I need to pass those details (name and email) to URL and the form should automatically ...
0
votes
1answer
2k views

Website Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Wppr_Public' does not have a method 'amp_support'

Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Wppr_Public' does not have a method 'amp_support' in /home1/thrfolde/public_html/3foldtraining/wp-includes/class-...
0
votes
1answer
1k views

Use URL parameter to create dynamic content

I need to get the following task done: My client has a huge product database with way over a thousand different products with tons of details. We don't want to generate every product page individually....
0
votes
2answers
108 views

Shortcode not interpreted if parameter set

My plugin implements a shortcode respecting wp best practices, but a strange behavior appears. First, the shortcode works perfectly on the test site, but not in production, with the exact same plugin ...
1
vote
1answer
122 views

Load custom template for specific GET parameter

How is it possible to load a different template file when a specific GET parameter is set? I want to create an account details page. So when the account parameter is set there should be loaded for ...
0
votes
0answers
26 views

Alter Woocommerce posts per page attribute [duplicate]

I need to alter the post_per_page value of the displayed products. In your opinion is possible to achieve this using a param added to the url? Something like www.siteurl.com/shop/?post_per_page=xx ...
1
vote
1answer
580 views

Get URL Param Plugin and Inserting Result in Widget Code

I am trying to insert the result from a Get Param plugin and insert it into a calendly widget on a WP page. In a code module, if I write the plugin syntax of: [urlparam param="Book" /] -and- ...