Home Forums Plugin Support WP User Frontend Pro Update select using hook

This topic is: not resolved

This topic contains 10 replies, has 2 voices, and was last updated by  towhid 4 years, 3 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #34644

    Jordan
    Member
    Post count: 6

    Hi,

    I have used the hook option to create a dropdown of selectable taxonomies using wp_dropdown_categories( $args ). I'm wondering if you could off me advice on how to save? I see you use meta in all of your examples for custom fields but not anything relating to taxonomies so I'm wondering how you would go about this?

    Thanks.

    #34745

    Jordan
    Member
    Post count: 6

    Hi,

    I've changed the select menu to list like this:

    function render_visibility( $form_id, $post_id, $form_settings ) {
    
    	$taxonomies = array(
    	    'type'
    	);
    
    	$args = array(
    	    'orderby'           => 'name', 
    	    'order'             => 'ASC',
    	    'hide_empty'        => false,
    	    'fields'            => 'all',
    	    'hierarchical'      => true, 
    	    'child_of'          => 1, 
    	    'get'               => 'all',
    	    'pad_counts'        => false,
    	); 
    
    	$terms = get_terms($taxonomies, $args);
    
    	echo '<select>';
    	foreach ( $terms as $term ) {
    		echo '<option value=' . $term->term_id . '>' . $term->name . '</option>';
    	}
    	echo '</select>';
    }

    If someone could advise on how to make the values of the taxonomy dd to the post that would be great.

    Thanks.

    #34752

    towhid
    Participant
    Post count: 4505

    Hello Jordan,

    Firstly, I will try this code for me and let you know. Hope I will be back to you with a right solutions. Please allow me some time.

    Thank You ๐Ÿ™‚

    #34823

    towhid
    Participant
    Post count: 4505

    Hello Jordan,

    The code you provide to me should work. Please have a look this link – http://docs.wedevs.com/using-action-hook-field/ for get instruction of Action Hook for WP User Frontend.

    Thank You ๐Ÿ™‚

    #34844

    Jordan
    Member
    Post count: 6

    hi, thanks for the reply.

    I've looked at that and I don't see how I can get it working. Would it be possible to give me a hint or even tell me how I would be able to do it?

    Thank you.

    #34954

    towhid
    Participant
    Post count: 4505

    Hello Jordan,

    Can you please read this documentation – http://docs.wedevs.com/using-action-hook-field/.

    Thank You ๐Ÿ™‚

    #34966

    Jordan
    Member
    Post count: 6

    Hi,

    I did read it but it's quite vague when you are trying to do what I need to get done. It doesn't go into detail on how to add meta to taxonomies. The meta tag there is attached to a custom field but if using a taxonomy where can you place the meta? What does it bind to? What other options are there?

    You gave me that link before and I told you that I had read it and asked you for help and you just sent it again. That is not very good support. I've obviously wasted my money here. Do you offer refunds?

    Thank you.

    #34967

    towhid
    Participant
    Post count: 4505

    Hello Jordan,

    Sorry for the inconvenience. The link I provide was sent by mistake. I am trying to get a way to help you. Action Hook is little bit complicated for me because I am not a coder and I am good at code. I have asked my developer team they told me you are doing the right way. I am again asking sorry for my inconvenience.

    Hope you understand.

    Thank You ๐Ÿ™‚

    #34980

    towhid
    Participant
    Post count: 4505

    Hello Jordan,

    I have send you the code you demand. Please the following link – https://gist.github.com/tareq1988/809ed96eaaf0ce5480e0. Hope it will solve your problem.

    Waiting for your answer.

    Thank You ๐Ÿ™‚

    #35067

    Jordan
    Member
    Post count: 6

    Hi,

    Thanks for the reply. The link you sent links to one of the comments here.

    #35068

    towhid
    Participant
    Post count: 4505

    Hello Jordon,

    I have edited my post. Can you check it again please.

    Thank You ๐Ÿ™‚

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Update select using hook’ is closed to new replies.