The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
2answers
40 views

Returning a value from a PHP page

I have created a WordPress page that has this simple PHP code: <?php $result = array( 'State' => 'Done', 'ID' => 1 ); wp_send_json( $result ); ?> When ...
1
vote
1answer
949 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
18 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 ...
2
votes
1answer
884 views

Display posts from an author using search parameters (not author template/query_posts)

Is there a way to retrieve a list of all the posts by an author using search (example: ?s&author=xxx)? I can't use query_posts or author template (don't ask why, take it as a condition). And it ...
0
votes
1answer
49 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
18 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
29 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 ...
1
vote
1answer
2k views

Using several add_action with parameters inside a class

I'm creating a theme framework and using a class to initiate all basic function of the theme (adding theme support, menus, etc). I've got stuck when I tried to enqueue the scripts and styles though: ...
0
votes
1answer
607 views

Why won't the action hook wp_head accept parameters?

I'm working on a plugin that adds scripting to the head using add_action('wp_head',..); I have to pass a variable to the function to get my desired result. To test this I'm simple "echoing" out ...
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 ...
1
vote
2answers
150 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
1answer
40 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 ...
0
votes
0answers
136 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
42 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
68 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
338 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). ...
3
votes
1answer
464 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
37 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
26 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
72 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 = mydomain.com/wp-content/uploads/2015/01/name-file-...
0
votes
0answers
59 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
65 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
116 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
77 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 shadow-...
0
votes
2answers
106 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
144 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
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
1answer
53 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
0answers
178 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
34 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 ...
1
vote
2answers
563 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
457 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 ...
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
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
808 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
269 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
227 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
594 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 = ...
0
votes
1answer
131 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
290 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 ]['...
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 &...
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
2k 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
322 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
326 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
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 ...