The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
48 views

Loop 1 user randomly

At the moment I am using wp_user_query to loop users from a specific role(leden) on a webpage. For the overview page this is working fine, but on my homepage I want to feature one random user. I was ...
0
votes
0answers
17 views

How can I make query string parameter used by shortcode content part of permalink?

I have made shortcode content that displays a form where you can enter some values, after submit save the values in a database table and redirect to /pageurl?id=x. If the query string parameter id is ...
0
votes
1answer
27 views

How to get setting from separate file?

I writing a wordpress plugin, that connects to external database and fetch data. Also it create custom button for vitual editor. By clicking this button modal window has been opened, and after that I ...
0
votes
0answers
17 views

isset not working on 'error' param with valid URL

The below code is not working when there is an 'error' param, but does work with the other two params. For example: /my-courses/?error=access_denied When the URL looks like the above, the if ...
0
votes
1answer
35 views

Get parameters and custom page template

My WP website have calendar page with custom page template. If i open mysite.com/cal i see calendar of current month, if i open mysite.com/cal/?month=01&year=2015 i see calendar for january. It ...
1
vote
2answers
128 views

Query string parameters from custom fields, inconsistent results

I've got a custom post type called course. Within a course post, I have a number of custom fields, specifically (all AFC select dropdowns): course_or_project, time_to_complete_project, ...
0
votes
0answers
112 views

Redirect based on $_GET parameters

I'm coding a payment gateway plugin for a webshop. I'm having trouble redirecting the users to two different pages based on the order status. In the payment sent to the gateway I can add one ...
0
votes
1answer
40 views

Using permalinks with parameters

I am trying to make a custom web app with wordpress. I have a page, Person with URL http://www.domainname.com/person. In that page, i have a shortcode. This shortcode is going to extract a get ...
0
votes
0answers
55 views

How can I change sidebar position via URL parameter?

I have live Customizer on my theme and there is an option to set the sidebar position to align left or right. How can I change the sidebar position via URL parameter? For example, if my sidebar ...
0
votes
1answer
295 views

Dynamically change page title from URL param

I currently use SEO plugin but I need some extra help because the plugin cannot help me in this case. I have a page that displays data based on a URL parameter (ie. http://example.com/?user=john25). ...
2
votes
1answer
395 views

Why “?v=hash” is added to my URLs? [closed]

I'm new to wordpress, I set up everything, but there's something that bothers me: on every single URL or link, there's a "?v=hash" appended everywhere (example.com/?v=d21feabed96b). I tried to see ...
0
votes
0answers
36 views

Save url parameters once page is loaded

I am sending out a campaign and want to track not just how many clicks I get via the campaign, but who of who I send it to actually clicks it. On my end I can append url parameters with the details I ...
0
votes
0answers
22 views

Send “hide header” parameter from ios app

I am creating a Wordpress website. One of the main ways in which it will be accessed is from an iOS app. When the website is accessed within my app, I want to somehow pass a parameter so that the ...
0
votes
1answer
71 views

How to change this internal image link parameter using PHP?

How resize this string / change link parameter. Original file = mydomain.com/wp-content/uploads/2015/01/name-file.jpg Return to $string now = ...
0
votes
0answers
55 views

How to pass parameters thru URL?

I have two input text box, one recaptcha and submit button. I want to check if the values that inputted by the user are in the database and if the recaptcha is checked. But the database is located on ...
0
votes
2answers
58 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
1answer
113 views

query_posts with meta_value

I have category 'news' http://localhost/foldername/news, for each 'news' posts I have custom field called 'years' and is set up as a Text Field. I have 2 values assigned n different posts '2013' and ...
0
votes
2answers
72 views

How to pass parameter that ends up being part of a class name with wordpress shortcode

This is the resulting html I want to produce with a shortcode - when editing page content in WordPress: <div class="shadow-wrapper half-shadow im-centered"> <div class="box-shadow ...
0
votes
2answers
100 views

Custom URL segment parameters for posts

I need to add a custom parameter/segment to the post URL. For example, when I have a post at example.com/post-name, I need to add another segment like example.com/post-name/places. After that, I ...
0
votes
1answer
134 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
52 views

What is wrong with my WP_Query Arguments?

In my single.php file I am using a nested WP_Query to show more posts, at the bottom of the page. My code for the query and nested loop are as follows: <?php $ep_args = array( ...
0
votes
1answer
27 views

Duplicate pages with ?s parameter

I scanned my website with a duplicate content scanner tool, and it gives me lots of duplicate content pages with ?s parameter at the end, which are crawled by Google. How can I remove these pages? ...
0
votes
0answers
157 views

Adding 'query_vars' filter redirects to the latest posts page

On our main page we tried to use an additional query parameter to keep in session and use later. Instead of browsing www.example.com/mywp, the user is now browsing www.example.com/mywp?param=value and ...
0
votes
1answer
28 views

Sortby parameter to sort users

So for my post list, currently these are sortby post_count. Now, I am trying to sort the posts by "most newest" or "recent" Here is how the shortcode works [sortby=post_count] Other parameters ...
1
vote
1answer
74 views

Order & Orderby Parameters

I am trying to figure out what the orderby parameter is for "newest" post author. http://codex.wordpress.org/Class_Reference/WP_User_Query#Order_.26_Orderby_Parameters I want to order users by ...
0
votes
1answer
33 views

Custom Post Type URL Rewriting

I would like to add parameter to custom post type posts So I need to do my url like that. http://www.mywebsite.com/mycpt-slug/post-slug/myparameter I found this solution but here it's work with post ...
0
votes
1answer
1k views

Trying to use add_action and do_action with parameters

In my themes functions.php I trying to add a function with parameters (as a test if this works, not for the functionality) and it simply doesn't work. The parameters always arrive empty even if I ...
0
votes
1answer
785 views

how to load posts to a custom post template after using template_redirect or template_include

I need to use the URL parameter ?m=1 to load every page of my wordpress with a different template but the problem is that I can't pull the text and posts that can be accessed using the canonical URL I ...
0
votes
1answer
253 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) { ...
1
vote
0answers
224 views

Using different parameters for different queries with pre get posts in functions.php

Im using pre_get_posts for my taxonomy.php for my products and paginations to work properly. And I have my pre_get_posts in my functions.php. This is how that current code looks in my functions. ( ...
0
votes
1answer
548 views

post_parent array doesn't work

I have a problem. I created a shortcode to show a galerie. I used query_posts to fetch all posts of a parent post and get the data from there: function galerie_baureihe() { $parent_id = ...
1
vote
2answers
523 views

Why does rewrite rule work for page not for custom post type post?

Update: I read that a custom rewrite rule might be overridden and drop any parameter variables, when the custom rewrite rule is used on a child/parent page/post. The post my custom rewrite rule is ...
0
votes
1answer
124 views

Does anyone know all parameters of get_comments()

Here is the link. There is a lot of parameters that didn't explain yet, and I want to know all about it. Thought, I have try to read the code, but can not understand it at all. The more I try to read ...
0
votes
0answers
270 views

wp_upload_bits - define (sub)folder / (sub)directory before filename?

I have this code for a plugin I'm using. $comment_image_file = wp_upload_bits( $title . $user->user_login . $comment_id . '.' . $file_ext, null, file_get_contents( $_FILES[ $comment_image_id ...
0
votes
1answer
437 views

oEmbed vimeo with add_query_arg parameters not inserted to HTML

I'm trying to add some parameters to oEmbeded Vimeo videos on my homepage template. I used the solution (with add_query_arg) that @splashingpixels suggested here: Add parameters vimeo videos using ...
2
votes
2answers
2k views

Determine WP_Query parameters from URL

I'm wondering if it's possible to determine WP_Query parameters by only using the given page URL. The reason I'm trying to do this because I'm developing a SPA theme (and ultimately a JSON response) ...
0
votes
2answers
1k views

missing argument 2 when passing arguments to add_action

I wanted to pass arguments to a function triggered by an add_action hook. I followed the codex on this. I got a warning and the result was erratic, with an unexpected behavior. This question has ...
0
votes
1answer
77 views

Adding Parameters to get_comment

I have a code like this: <?php $comments = get_comments( 'post_id=' . $post->ID ); echo get_comment_author($comments[0]->comment_ID); ?> <br /> <?php $comments = get_comments( ...
1
vote
1answer
303 views

wp_remote_get() and javascript/noscript situation

I am using wp_remote_get() to get access to certain pages on the net. However, when I make a call using wp_remote_get(), the response I recieve is a webpage that contains the following lines of code: ...
1
vote
1answer
308 views

How to add parameter to wp_enqueue_script?

I have the situation that I need to include special scripts only in case a parameter in a macro is used. For the background, see the following: My plugin ChessTempoViewer which wraps a JavaScript ...
1
vote
1answer
3k views

get_the_title($postID) OR get_the_title()?

I would like to know which could be more performant between these two approaches of getting data of a post To use a loop after a WP_Query($aConditions) and use functions like get_the_title() ... and ...
0
votes
0answers
53 views

Custom POST parameters, index.php

I have contact form and I need to write custom function, that will send some data to admin e-mail. I dont get how to make index.php (or other wordpress script) receive my POST parameters, which I will ...
-1
votes
2answers
169 views

What are the parameters are used in add_action and filters?

add_action( $hook, $function_to_add, $priority, $accepted_args ); I am unenable to understand what the code is used for? What are the inbuilt parameters and functions are mostly used in add_action?
2
votes
1answer
69 views

How do I know what variables are passed in a filter/action and what their meaning is?

Something I have seen several times now and I don't understand is the following: In a theme's functions.php a function is defined and then attached to a hook, like so (simplified example): function ...
1
vote
1answer
898 views

Any way to use a custom Parameter for vimeo embed without using an iframe?

I am trying to get some oembed parameters attached to my Vimeo clips. I tried to get it going using the following two instructions: Passing Parameters to a Vimeo link in a WordPress Custom Field - ...
1
vote
1answer
1k views

Pass additional parameter in the URL

How do I pass additional parameter in the url for pagination to work my existing page link is http://localhost/site/wp-admin/admin.php?page=myPage How do I create the syntax / logic in PHP to add ...
0
votes
2answers
1k views

Passing parameters to a static front page

I have googled a lot, but so far haven't come close to a proper solution yet. I need help with passing parameters to the homepage of a WordPress website. Here's my setup / requirements: I use a page ...
0
votes
1answer
1k views

How to pass on a value as parameter via url to another page

I'm dealing with a problem I can't solve myself. I did a few hours of research about it, but I didn't manage to make it work. I want to send a parameter via the url to the page I'm forwarding to and ...
0
votes
1answer
684 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 ...
0
votes
0answers
87 views

Plus sign in query string to custom page gets 324 server error

OK, so I've created a page (http://justinhealth.com/testsite/error-signing-up). It's a custom error page for iContact. Now, when there's an error in iContact's signup, it actually goes here: ...