The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
13 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
29 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
7 views

Create page (inside plugin) that can process data

I need to create a page in wordpress where I can process parameters that are passed in a 'get' request. What steps need to be taken for this to happen
0
votes
1answer
13 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
27 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
16 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
40 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
18 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
0answers
20 views

How to use pretty urls with given parameters?

I am a bit in trouble finding the right solution or a plugin which handles my parameters to pretty URLs: Right now im using links like: <?= add_query_arg('post', get_the_ID(), get_permalink(83)) ...
0
votes
1answer
91 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
0answers
17 views

How to pass arguments with do_action to objects?

Passing arguments from do_action to objects added with: add_action('hook', array($obj, 'object_function')); does not work?
0
votes
1answer
282 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 ...
1
vote
1answer
77 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
141 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
134 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
2answers
197 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
66 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
68 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
0answers
23 views

wordpress custom url rewrite for custom post type

I have a wordpress page https://example.com/service-detail/, it shows some result. Currently if i have to filter result, a parameter is passed like this /service-detail/?services=myservice ...
0
votes
1answer
172 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
0answers
17 views

restricting the number of character for permalink

I have this code to set the number of characters in URL more than 20 word, But i try this and not work, Where are the problem. add_filter( 'sanitize_title', 'wpse52690_limit_length', 1, 3 ); ...
2
votes
2answers
740 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
748 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
57 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
154 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
168 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
990 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
44 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
108 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
59 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
314 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
985 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
662 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
761 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
375 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
79 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: ...
0
votes
1answer
122 views

How to return hook data when multiple parameters are present?

What is the proper way of returning data to a hook when there is more than one parameter present? Example apply_filters('image_downsize', false, $attachment->ID, $size) Attaching a callback ...
1
vote
1answer
1k 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
371 views

Why won't the action hook wp_head won't 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 the ...
3
votes
2answers
326 views

CPT archive 404ing when using a custom taxonomy name as a variable

So, I'm using a custom post type archive and generating a JavaScript-based filtering interface for sorting through results. Here's an example: http://www.inverity.org/sermons/ Now, what I'd like to ...
0
votes
2answers
935 views

problem in query_vars parameters

I've a problem. I've tried a lot of things but I could not find a solution. I use query_vars parameters in this page and there isn't any problem. But i don't use different parameters or the same ...
0
votes
2answers
1k views

Detecting $_GET parameters from any page + Cookie

I'm trying to create a basic affiliation system plugin that for now, will do the following: If it exists, read a $_GET URL parameter in any page (for instance http://mysite.com/about/?affid=1234). ...
1
vote
1answer
644 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
175 views

How do I pass $in_foooter to wp_enqueue_script() without passing other params?

I have some scripts that I'm enqueueing like this: wp_enqueue_script("jquery"); wp_enqueue_script("myscript" , get_template_directory_uri()."/js/myscript.js", Array('myscript'), " "); I want to ...
0
votes
1answer
150 views

Adding a Tag Parameter / Filter to My Shortcode

I have this plugin that displays category featured image thumbnails for each post via shortcodes.. like so, [categorythumbnaillist 3] (3 being the category of course) I would like it to only show ...
0
votes
1answer
74 views

Post AND page parameter for WP function

Is there no post AND page parameter for WordPress functions? So would I have to create a custom post type to define post AND page? For example, add_meta_box( $id, $title, $callback, $post_type, ...
0
votes
2answers
37 views

why do I have to use required parametres?

Why, when I want to use add_filter( 'author_link', 'foo', 10, 3 ); function foo ( $link, $author_id, $author_nicename ) {} I have to use 3 required parametres? Why cant I do this: add_filter( ...
0
votes
1answer
383 views

Where is this function's callback getting its arguments from?

This might be better suited to Stack Overflow, thought I'd try here first though. I was walking through this tutorial by Justin Tadlock and encountered the function below being used as the callback ...
1
vote
1answer
829 views

Open Wordpress 'Add New Post' admin page with parameters set via $_GET

I want to launch my web browser from an automation tool I use and open Wordpress "Add Nwe Post" page in the admin area with specific title and content (it varies everytime, I generate it dynamically ...
1
vote
1answer
519 views

wp_parse_args & category parameter

Am trying to use this code: function wp_custom_archive($args = '') { global $wpdb, $wp_locale; $defaults = array( 'cat' => 6, //doing nothing 'format' ...