Open WordPress ‘Add New Post’ admin page with parameters set via $_GET

The problem is that $content is a reserved variable in WordPress, you have to use another name. Here, I have used $pre_content: <?php /** * Plugin Name: T5 Editor content by request * Description: Default text for post content from GET variable <code>pre_content</code>. * Author: Fuxia Scholz * Version: 2012.06.30 */ /* * See wp-admin/includes/post.php … Read more

use query string in URL to display content on the page

Per the OP’s answer within their question: With your help and some Googling, I put together a shortcode that returns the value of any url parameter. Here it is: //THIS IS A CUSTOM SHORTCODE TO DISPLAY A PARAMETER FROM THE URL function URLParam( $atts ) { extract( shortcode_atts( array( ‘param’ => ‘param’, ), $atts ) … Read more

Trying to use add_action and do_action with parameters

You are using it wrong. add_action: attachs a function to an action hook. In your code, you are attaching alter_item funtion to admin_menu action hook. So, when admin_menu action happens, alter_item function is executed. According to codex, no parameters are passed to functions attached to admin_menu. So, the parameters your are trying to use in … Read more