Registration Form Hook

This topic contains 11 reply and 2 voices, and was last updated by towhid 9 years ago
Viewing 11 Posts - 1 through 11 (of 11 total)
Author Posts
March 18, 2015 at 10:22 pm 39399
towhid Hello! I will try and make this as brief and quick as possible. First off, GREAT plugin! Really enjoy it. Second, I have a custom image upload field title "header_image" in my registration form. Here is the code I have listed after searching around on the forums and using the documentation.
<?php
$curauth = (get_query_var(‘author_name’)) ? get_user_by(‘slug’, get_query_var(‘author_name’)) : get_userdata(get_query_var(‘author’));
?>

<?php $images = get_user_meta( $curauth->ID, 'header_image' );
 
if ( $images ) {
    foreach ( $images as $attachment_id ) {
        $thumb = wp_get_attachment_image( $attachment_id, 'thumbnail' );
        $full_size = wp_get_attachment_url( $attachment_id );
		
		printf( '<a href="%s">%s</a>', $full_size, $thumb );
    }
} 
?>
<?php echo get_user_meta( $curauth->ID, ‘header_image’, true ); ?>
But it is not displaying the image. Really all I am looking for is to get the url of the image that the user uploaded during registration. I realize this is not the exact code to get that, but I am working through that. Any help in that direction would be great. What am I missing in the code above to get the url of the image uploaded during the registration process? Thank you, Randall
March 19, 2015 at 4:42 pm 39511
towhid towhid

Hello Randall,

Send me the forum link and documentation link about the code you had mentioned.

Thank You 🙂

March 19, 2015 at 11:36 pm 39547
Randall Randall

Of course!

For the standard image hook I used this post:
http://docs.wedevs.com/showing-meta-fields-in-frontend/

For the author template, I pulled that from wordpress.

http://codex.wordpress.org/Author_Templates

I hope these help.

Thanks!

Randall

March 21, 2015 at 9:47 am 39630
towhid towhid

Hello Randall,

I need time to reproduce this issue the way you are trying. Please allow me some time. Hope I will come back with a right solution.

Thank You 🙂

March 26, 2015 at 1:45 am 40028
Randall Randall

Great!

Thank you!

April 6, 2015 at 11:03 am 40702
towhid towhid

In which file you have worked-out the above code in your theme? author.php file? Can you send me the file? I have to check.

Thank you 🙂

April 7, 2015 at 1:18 am 40757
Randall Randall

I am currently using WC vendors plugin and it is placed within their vendor-main-header.php file. How can I send you the file?

April 7, 2015 at 3:10 pm 40806
towhid towhid

Hello,

I am not sure WP User Frontend code will work in WC vendor plugin and what is the integration process you had taken. Would you please paste the above code in site’s content file for the theme and let me know the result.

Thank you 🙂

April 8, 2015 at 10:39 pm 40948
Randall Randall

Hello!

I posted the code into the wc vendors file and I cannot seem to find the image anywhere. Let alone hook it. How would you hook custom images in registration forms if it were something else?

For reference on WC Vendors and WP User FrontEnd Pro (http://www.wcvendors.com/knowledgebase/using-front-end-new-product-submissions/)

Thank you!

April 9, 2015 at 1:23 pm 40987
towhid towhid

Hello,

It is depend of theme structure. I am always test something in WordPress default template named “Twenty Fourteen”. There are a file named author.php and in there get_template_part( 'content', get_post_format() ); indicate to content.php page. Can you check that template please? If you are able to hook any meta field in content.php file. If yes, you can also do that “url of the image uploaded during the registration process” because that value are populate into the post meta table. I will first tell you to hook a meta field value into content.php file and after then paste your above code and see what happen.

Thank you 🙂

April 10, 2015 at 5:32 am 41032
Randall Randall

Excellent! I did as you asked and placed it in the twenty fourteen template content.php file. After changing the meta tag name to pv_header_image I was able to link the url with the code above.

Thank you very much for your help!

Randall

April 11, 2015 at 12:14 pm 41082
towhid towhid This reply has been marked as private.
Viewing 11 Posts - 1 through 11 (of 11 total)