Get single object term for custom taxonomy
Get single object term for custom taxonomy
Get single object term for custom taxonomy
Manage theme related custom posts
Use only selected regular categories for a Custom post form
Try this: add_action(‘init’, ‘replace_title_logic’); function replace_title_logic() { add_filter(‘wp_insert_post_data’, ‘replace_title_before_update’, 20, 2); add_action(‘wp_insert_post’, ‘replace_title_after_save’, 20, 2); add_filter(‘wp_insert_post_empty_content’, ‘allow_empty_content_for_listing’, 20 , 2); } function replace_title_before_update( $data, $postarr ) { if ( is_int($postarr[‘ID’]) && ($data[‘post_type’] == ‘listing’) ) { $custom = get_post_meta($postarr[‘ID’], ‘ref._nr.’, true ); if ( $custom && ( $custom != $data[‘post_title’] ) ) $data[‘post_title’] = $custom; … Read more
It turns out that global $wp_rewrite; is sitewide as far as I understand but am willing to be informed of the details here. Implementing it with a CPT RUINED my rewrite rules sitewide. Changing the rewrite=> array(‘slug’=>’name’) should have been where I stayed and back to basics on how to manipulate a CPT’s permalink structure.
If you want to use builtin WordPress categories, while calling register_post_type function with taxonomies parameter set to category If you want to create a custom category, then use register_taxonomy function to register a brand new taxonomy with second parameter to be your custom post type name and pass it taxonomy name to register_post_type as explained … Read more
query_post while (have post) get_template_part()?
Repost for any future googlers from @StenW ‘s wordpress plugin support thread: Github user @atnon made a very similar modification to the code 10 days ago, also using custom-fields (though giving the image a link rather than putting a link in the caption). You can see this code in his pull request. I re-wrote his … Read more
That description-like element between the image name and the “Tweet” link looks like it is being pulled from the image alt attribute. I don’t see the code that actually produces that section– I can’t find “Tweet” in what you posted. However, you might be able to get rid of that by passing an empty alt … Read more
I bet it’s much simpler than it seems… Replace <textarea name=”ourwork[%1$s][client-desc]” value=””></textarea> with: <textarea name=”ourwork[%1$s][client-desc]”>%7$s</textarea> Don’t forget to replace string in jQuery code, too. 2 Problems: You forgot %7$s Textarea don’t use value=”” but put value between <textarea> and </textarea> (if you use value=”” it will be saved but not showed)