Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
24 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
13 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
39 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
294 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
467 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
42 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
104 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
117 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
370 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
21 views

How to add parameters on add_filter()? [duplicate]

I have this example to customize the excerpt length: function custom_excerpt_length() { return 30; } add_filter( 'excerpt_length', 'custom_excerpt_length' , 10, 1 ); and works perfect. But I want ...
0
votes
0answers
42 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
79 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?
0
votes
0answers
37 views

how to invoke mail with additional parameters

My mailserver doesn't send me WordPress notifications. My hoster says that to have the php function mail(,,,,) working I need to set the fifth parameter (additional parameter) equal to -f ...
2
votes
1answer
49 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
119 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
811 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
488 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
637 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
276 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
73 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
95 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
813 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
257 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
295 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
627 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
676 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
551 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
151 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
144 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
73 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
284 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
695 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
442 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' ...
1
vote
3answers
2k views

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

I do not want to display the titles of videos I embed on my wordpress site. The way I've been doing this is using the embed link, inserting the iframe in the wordpress post and adding the custom ...
1
vote
3answers
503 views

Making extra parameters optional

I've setup a very specific function and it works well but I'd like to make the parameters optional but I can't get a handle on the regex bit: add_rewrite_rule('whats-on/([^/]+)/([^/]+)/([^/]+)/?$', ...
-1
votes
1answer
84 views

Create option for custom posts types

I'd like to add options to a custom post type and I have no idea how to deal with it. Options should be treated as parameters for my custom post type. For instance I'll get a "Plublic / private" flag ...
-2
votes
1answer
91 views

append $_GET parameters to post

I try to find a plugin that can "auto insert" to post edit/add page a parameters by fill $get paramerts: for example:post.php?title=a&tags=ss,dds,aa Ideas?
1
vote
2answers
386 views

How do I retain url parameters the entire time a user browses my site?

We have customers that come from other sites and I would like to retain a url parameter /?lead=openeye throughout the time that they're browsing. That way when they fill out a form I can capture the ...
0
votes
1answer
115 views

Pre-existing arguments when using queries

I am struggling to understand how queries work with get_posts(), query_posts() and WP_Query(). In particular I do not understand what pre-existing selection may exist when using these on a given page ...
1
vote
2answers
1k views

How to add URL-Parameter for Javascript Widgets?

I need to add pamarameters to URLs that are read by javascript widgest/gadgets run on the site. Whenever I just add them e.g. the original URL is http://example.com/blog/page/ and the parameter is ...