Articles of parameter

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 submitting a form in another page using Ajax(JQuery) it calls this PHP page, then in the JQuery method i try to read the returned value from the […]

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 Parameter “showinfo=0” to the end of the url. This has worked well, until I decided to change […]

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 on my local machine). I know that I can use http://blog.mysite.com/wp-admin/post-new.php?post_title=sometitle This is fine. However, if I try to […]

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 should be a public query (the filter in admin panel isn’t good). If isn’t available by default as a […]

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 – LimeCanvas.com Any way to use a custom parameter for YouTube embed without using an iframe – WordPress.SE.com Unfortunately what […]

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 call do_action with the parameters enqueued as suggested in this codex page. function alter_item ($user, $items, $action) { global $current_user, […]

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 do_stuff($a, $b) { // Do stuff with $a and $b } add_filter( ‘bloginfo_url’, ‘do_stuff’, 10, 2 ); Basically I think I understand […]

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) and would need to be able to determine a query without reloading the page. Thought it’s pretty hacky, I’ve been successful […]

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 do is pass in variables to my script to allow for filtering based on URL parameters. This works: http://www.inverity.org/sermons/?presenters=4 The problem is, this doesn’t: http://www.inverity.org/sermons/?speakers=4 “speakers” is the […]

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 that parameter so that I can have it show on the page, somewhere in my content?