Questions tagged [parameter]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
13 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
2answers
402 views

How to use endpoint, but remove/rewrite endpoint base?

I've been messing around with rewrites and query_var to generate some listings, for example: ~/my-page/?my_var=1 ~/my-page/?my_var=2 ~/my-page/?my_var=3 After perusing StackExchange and the ...
1
vote
1answer
3k views

REST API parameters not working with nginx

I'm having an issue with the server I'm working off of ignoring any parameters I send to the REST API. My local environment works perfectly, but for some reason the other environments don't. I work ...
0
votes
1answer
46 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
16 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' =>...
9
votes
3answers
29k views

use query string in URL to display content on the page

I'd like to say something on my page based on what page the person got there from. I can set up the link to that page to be: www.example.com/page?parameter=myparameter Is there a way I can access ...
0
votes
1answer
71 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
36 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
13 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.
1
vote
1answer
628 views

Passing a parameter to a permalink

I'm trying to create permalinks for a page that currently has parameters passed to it. The site was set up by somebody else and I'm not familiar with Wordpress I have various pages which have URLs of ...
0
votes
0answers
42 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
74 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
28 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
33 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
1answer
637 views

Pass post title as URL parameter

On my site/blog, I have one landing page, through which I collect all ‘Consultation Requests’ – let’s call it: http://example.com/conso-request/ On every page/post of the site is a navigation link, ...
0
votes
0answers
16 views

Google indexing Paramaters on WordPress sites

I am having a strange issue with Google indexing parameters after the trailing slash on my site which is causing WordPress to throw 404 errors. +&cd=2&hl=en&ct=clnk&gl=za The above ...
0
votes
0answers
12 views

Linking WordPress User Profiles Together With Shortcodes

I am using Ultimate Member, and have franchise owners as one user role and shops as a different role. On the franchise owner profile, I have included a shortcode (that I need help with) to display the ...
1
vote
2answers
1k views

Wp Login redirect strips parameters from url

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 ...
1
vote
1answer
56 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
30 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
15 views

How to display report of users using Gravity Forms?

I am using WordPress and the Gravity Forms plugin. I am trying to print/run a report of users based on meta key, meta value and role selections, using a simple Gravity Form to choose those selections. ...
0
votes
0answers
99 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
12 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 -> '&...
0
votes
0answers
22 views

Passing URL parameters to WordPress buttons

I'm beginner with programming and web development. I have a WordPress website (http://www.example.com). My post link is http://www.example.com/mypost/, so when I click on a button (assuming demo 1 ...
0
votes
0answers
29 views

WordPress Multisite query parameters

Am currently having an issue with the redirection of query parameters on a multisite. I have embedded an Angular App inside an iframe and have a script to assign the query parameters of the app to the ...
1
vote
1answer
13 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: &...
5
votes
1answer
25k views

How to create a shortcode with 1 parameter (atts)

I am having trouble getting a shortcode to work with 1 attribute. Here is my shortcode [sme_user-email userID="2"] Here are my scripts - none of them work. function getUserEmail_func($atts) { ...
0
votes
0answers
31 views

Change url parameter's name with rewrite

¡Hello! I need some help... I get this URL: https://mysite/entrevista-sesion/?Name=pedro And I need to change the parameter's name to: https://mysite/entrevista-sesion/?n=pedro I'm trying to ...
0
votes
3answers
219 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 ...
0
votes
0answers
68 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
70 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
0answers
30 views

Custom rewrite rule don't pass parameters

I created a page template where I list some properties I get from an external source, but a need to to recover an URL parameter in order to get the right properies... For example, this URL : www....
0
votes
1answer
688 views

How to pass menu slug as a variable to wp_nav_menu?

I need to show a menu depending on what user selects on Page Options. I take menu name from a user to a variable and now i need it to parse through wp_nav_menu. Im trying it like this but it doesn`t ...
0
votes
1answer
37 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
2answers
979 views

How to get variables from fucntion.php to my plugin files

I have written a function in functions.php that gets variables from a contact form and sends the inputs (and some other info like IP and location..) to my email. I am starting to work on my first ...
0
votes
2answers
2k views

How to parse a custom url (within WP site) and obtain params passed to that URL

In my WP site-- eg. http://www.mydomain.com-- a request has to be passed to a custom URL-- http://www.mydomain.com/custompage?param1=abc&param2=def Now, I wish to obtain the parameters passed to ...
1
vote
1answer
69 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 ...
2
votes
1answer
1k views

append url parameters to all links

I have a form in all my pages, and it has an hidden field named ref If the user land at www.example.com/1/ref=fb_ad and fill in the form in this page - the form catches the URL parameter. However, ...
0
votes
1answer
1k 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
595 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
72 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
56 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
24 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
281 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- ...
0
votes
1answer
514 views

How to create custom search result page with custom URL parameters for custom post type?

So I guess the question is : How do I define new page/url to which I can pass custom parameters, do a search for custom post type and pass the results to custom template for rendering? I have made a ...
0
votes
1answer
22 views

Get param from shortcode in plugin function

I am trying to get the variable passed in my shortcode so I can do a request with the id to a API. The shortcode looks like this: [product id="2"] In my function I want to do something with the "2". ...
-1
votes
1answer
288 views

help me remove this additional parameter in url

One of my websites is having an additional parameter /?v=e5477cbee260 after the url. I do not understand what is this and how to remove it.I am using a godaddy hosted website .
0
votes
1answer
53 views

append current user-id to all internal permalinks

i am toying with myCred and would like to reward logged in users for sharing content bringing in visitors. myCred offers affiliate linking by user-id, so I figure, I "only" need to achieve appending ...
0
votes
1answer
1k views

array_filter warning - wp-includes/post.php line 3148

I inserted the following code, see below, to have a post submitted from the front-end. When you submit it, this warning appears: Warning: array_filter() expects parameter 1 to be an array, string ...
-1
votes
1answer
915 views

Shortcode to include PHP file, pass various parameters to include?

Want to include php file in WP content. Some parameters will be different depending on the include. I want to write 1 include shortcode. I do not want to write different include functions for each ...