Zack
  • Member for 11 years
  • Last seen more than 1 year ago
How to update custom fields using the wp_insert_post() function?
Accepted answer
35 votes

If you read the documentation for wp_insert_post, it returns the post ID of the post you just created. If you combine that with the following function __update_post_meta (a custom function I ...

View answer
get_the_term_list without links in 3.1
23 votes

However @anu is right, I figured out you can call the php function strip_tags to strip out the tags of the return value. $terms = get_the_term_list( $post->ID, 'tags' ); $terms = strip_tags( $...

View answer
Redirect to settings page after install
Accepted answer
5 votes

Register an activation hook and then redirect the user's browser when you're done installing your plugin. function myplugin_activate() { // TODO: Install your plugin here. // I don't ...

View answer
WP Insert Post and then go to post
3 votes

Try the following: $post_id = wp_insert_post( array( 'your', 'args', 'here' ) ); $link = get_permalink( $post_id ); wp_redirect( $link ); die();

View answer
How to hook wp_list_pages?
Accepted answer
2 votes

A quick Google Search came up with this Source Try the following: function wp_list_pages_filter($output) { // modify $output here, it's a string of <li>'s by the looks of source ...

View answer
Adding second Email address for WP user notifications
2 votes

A suggestion, albeit a sorta hack, I'd like to make is to use a mailing list. You can add an infinite number of emails to a mailing list. An alternative you could do is to use the publish_{$posttype} ...

View answer
How can I find the cause of theme crashing Apache in Xampplite?
2 votes

You can try looking in \xampplite\apache\logs for various error log messages.

View answer
Adding a second custom taxonomy to a custom post type (both shown in its table)?
Accepted answer
2 votes

I use the following in my filter hook manage_edit-<post-type>_columns add_filter( 'manage_edit-visitor_columns', array( &$this, '_wp_filter_visitor_columns' ) ); public function ...

View answer
Add custom field automatically to custom page types
Accepted answer
2 votes

I too had a question about this. Luckily, Chris_O answered it for me. You may also want to check out this question, too. Here's an example of what I've done with meta boxes and you can see it's quite ...

View answer
Creating a admin widget for /wp-admin/post.php?
2 votes

For one, Dashboard widgets (what you're using in the example) are for the main wordpress admin page. I think what you want is this tutorial. You also want to look at add_meta_box to look at how to ...

View answer
How to include this jQuery File in wordpress?
1 votes

You may want to look at wp_enqueue_script. Although, I just noticed you are using the $ prefix. Try to do something like this: <script type="text/javascript"> (function($) { // my ...

View answer
"Members only" section of a WordPress site - self signup and no backend access
1 votes

There's a few plugins that you can look at. There's a few of these that you can look at and write your own membership plugin catered to your client's needs. Members Only - Makes the entire blog ...

View answer
Unable to save custom taxonomy terms in a custom-built metabox
Accepted answer
1 votes

I believe your problem might be nonce-related. I see you're doing what I did at one point with a problem I had when I tried doing nonces the way you're using them. I'll quote @EAMann on this: The ...

View answer
How can I auto-add my posts to my site's Facebook fan page?
1 votes

I believe you want to look into something like stream.publish on facebook's api documention reference. This method publishes a post into the stream — on the Wall of the current or specified ...

View answer
Anyway to specify what should appear in <title> in .php file?
1 votes

You can add a filter for the get_header hook and then you can return custom code for the header.

View answer
Custom Post Types set up, how do I style the main slug page?
Accepted answer
1 votes

Hi @Jared One idea is to look at the 'rewrite' argument for custom post types. You can also create a [shortcode] and create a page in your functions.php file for displaying the Packages.

View answer
How to verify this checkbox is checked?
0 votes

You may want to check out this tutorial. An example: $checked = get_option( 'automatic' ) ? 'checked="checked"' : ''; echo '<input type="checkbox" name="automatic" value="automatic" ' . $checked ....

View answer
How to get and edit custom fields if in Quick Edit
Accepted answer
0 votes

A couple things, Make sure in your save_post hook you're checking for DOING_AJAX which is used for saving in quick-edit. Check out my other question: Quick edit screen customization. The answer I ...

View answer
Google maps plugin
0 votes

You can use an iFrame to embed your Google Map on a custom WP page and some custom CSS to float some text to the right or left side too.

View answer
Retrieving values of custom fields in Quick Edit mode
0 votes

This is untested code. See if it works for you. Basically, as you'll read below, I globalize $post, check for your CPT, and then retrieve the custom field event from the post's meta (returning a ...

View answer
Placing a Custom Post Type Menu Above the Posts Menu Using menu_position?
0 votes

On the same link you linked, it reads: menu_position (integer) (optional) The position in the menu order the post type should appear. Default: null - defaults to below Comments 5 - below Posts 10 - ...

View answer
Pre-fill fields with content from outside when creating a new post
0 votes

In addition to Mike's answer, you can also use WordPress' XML-RPC server to do external posting. It depends on what you're trying to do.

View answer
Tagging users in Wordpress
0 votes

You might want to check out the following article. I think it's what you want. Adding and using custom user profile fields

View answer
Custom Post Type, Custom Columns List
Accepted answer
0 votes

I did a slight hack for this to work. I added a hidden field named "post_title" as if I'm enabling Title support, though without actually having the ugly title bar positioned. <div id="titlewrap"&...

View answer
Creating a metabox to upload multiple images
0 votes

Yes it's quite possible. See a response I got about metaboxes. Basically, you'll just want to add a hook for save_post and verify the nonce field. function my_save_post_callback( $post_id, $post ) { ...

View answer