MarceFX
Forum Replies Created
-
Hi guys,
I emailed the author of the plugin a couple of weeks ago and got this message:
If it’s a taxonomy, use it like this (on wpuf-addpost.php):
wp_dropdown_categories( ‘show_option_none=’ . __( ‘– Select –‘, ‘wpuf’ ) . ‘&hierarchical=1&taxonomy=pa_attribute&hide_empty=0&orderby=name&name=category[]&id=cat&show_count=0&title_li=&use_desc_for_title=1&class=cat requiredField&exclude=’ . $exclude );
I haven’t had time to implement it since we decided to use another plugin.
Good luck!
I have tried using this function (included in gravityforms-update-post.php), but it’s not working. I replaced “post_custom_field” for “select”, since I think that’s the Drop Down field name. I also delete the “isset” condition in order to always apply the function, but no luck…
Any ideas?
public function gform_post_data($post_data, $form) { if ($this->is_allowed() && !$this->is_delete()) { // If a custom field is unique, delete the old value before we proceed foreach ($form['fields'] as $field) { if ($field['type'] == 'post_custom_field' && isset($field['postCustomFieldUnique'])) { delete_post_meta($this->post['ID'], $field['postCustomFieldName']); } } $post_data['ID'] = $this->post['ID']; $post_data['post_type'] = $this->post['object']['post_type']; $this->options['post_status'] = apply_filters($this->name . '_status', $this->options['post_status'], $form); if (in_array($this->options['post_status'], array('draft', 'publish', 'pending', 'future', 'private', 'inherit'))) { $post_data['post_status'] = $this->options['post_status'] == 'inherit' ? $this->post['object']['post_status'] : $this->options['post_status']; } } return $post_data; }
Another one struggling with the same problem…
So far, I’ve been able to get the proper permalink structure with this piece of code:
add_action('init', 'custom_init'); add_filter('post_type_link', 'story_permalink', 10, 3); function custom_init(){ $story = array( 'query_var' => true, 'rewrite' => false, ); $artist = array( 'query_var' => true, 'rewrite' => true ); $writer = array( 'query_var' => true, 'rewrite' => true ); global $wp_rewrite; $story_structure = '%pa_dispositivo%/%pa_provincia%/%product%/'; $wp_rewrite->add_rewrite_tag("%product%", '([^/]+)', "story="); $wp_rewrite->add_permastruct('product', $story_structure, false); } function story_permalink($permalink, $post_id, $leavename){ $post = get_post($post_id); $rewritecode = array( '%pa_dispositivo%', '%pa_provincia%', $leavename? '' : '%postname%', $leavename? '' : '%pagename%', ); if('' != $permalink && !in_array($post->post_status, array('draft', 'pending', 'auto-draft'))){ if (strpos($permalink, '%pa_dispositivo%') !== FALSE){ $terms = wp_get_object_terms($post->ID, 'pa_dispositivo'); if (!is_wp_error($terms) && !empty($terms) && is_object($terms[0])) $artist = $terms[0]->slug; else $artist = 'unassigned-pa_dispositivo'; } if (strpos($permalink, '%pa_provincia%') !== FALSE){ $terms = wp_get_object_terms($post->ID, 'pa_provincia'); if (!is_wp_error($terms) && !empty($terms) && is_object($terms[0])) $writer = $terms[0]->slug; else $writer = 'unassigned-pa_provincia'; } $rewritereplace = array( $artist, $writer, $post->post_name, $post->post_name, ); $permalink = str_replace($rewritecode, $rewritereplace, $permalink); } else{ } return $permalink; }
But when I click on a product, I get a product listing page, instead of the actua single post page. Any ideas?
Thanks
I was hoping there was a PHP workaround :-/
Thanks anywayYes, there’s definitely something there. The theme add some kind of Woocommerce class to all others products related pages but not to this one.
There a class call “usesidebar-auto-column-4” which sets the 4 columns right, but the custom taxonomies get “usesidebar-auto-column-“. But I can’t find what’s causing that :-/
Forum: Plugins
In reply to: Letting users to sell products and get paid by PayPal?Ok, thanks. I’m going to dig into it.
Forum: Plugins
In reply to: Letting users to sell products and get paid by PayPal?Seriously, I’m not following you, buddy…
Forum: Plugins
In reply to: Integrate jQuery File Upload plugin with Gravity Forms?Thanks, but I’ve already tried. There’s nothing official on this, so I decided to give it a try here, where there’s many users with broad PHP expertise ??
Cheers!
Any news on this?
Thanks!Hi,
I was also struggling with this issue until I got to the post. Thanks for the help.
Now, users can only edit their posts, but when I try to edit another user post, the gravity forms loads, although with no data. Can I redirect a user to another page when he tries to edit another user post?
Example:
1.Author creates post with ID=36a: He tries to edit using this URL: site.com/edit-page?gform_post_id=36–> RESULT: ok
b: He tries to edit another user post (ID 333): site.com/?gform_post_id=333 (RESULT: Form loads in blank. I want to automatically redirect the user to another page when the URL is submitted)
Thank you
Hi,
Thanks to your directions, I found the problem ?? It was related to permalink settings. I had set a custom name for the products tags which was the same as the condition name. My bad.Thank you!
@WAXFROGDESING, can you help with custom taxonomies? How you call another taxonomy on this plugin? I’m using ‘attributes’ from Woocommerce. Thank you
Hi,
Any news on this? I’m desperate trying to get my custom taxonomies working :-/
Thank you
Solved!