Giri
Forum Replies Created
-
AuthorPosts
-
Hi try this code
.sd .sd-detail-info { max-width: 53% !important; } @media only screen and (max-width: 500px) { .sd .sd-detail-info { margin-bottom: 20px; } .sd-detail-cta { float: none; width: 100% !important; } }
Thats good to know. You are welcome 🙂
Not sure how that works. The $user_id variable coming from out of nowhere.
But if it works for you then its fine.
Thanks for letting me know.
Hi Elena,
You can try this code if the previous doesn’t work.
add_action('geodir_after_listing_post_title', 'avatar_geodir_after_listing_post_title'); function avatar_geodir_after_listing_post_title($view, $post) { $author_id = $post->post_author; $author_link = get_author_posts_url($author_id); $entry_author = get_avatar( $author_id, 60 ); echo sprintf('<div class="author-avatar"><a href="%s">%s</a></div>', esc_url($author_link), $entry_author); }
But i cannot give you more assistance without looking at your page.
Hi Elena, Did you replace my old snippet with the new one or you use both snippets?
Hi Elena,
I’m not sure what you mean link don’t work. You mean there is no link or pointing to incorrect page?
Its better if you give me the page url where i can see that avatar in a private reply.
Thanks
add_action('geodir_after_listing_post_title', 'avatar_geodir_after_listing_post_title'); function avatar_geodir_after_listing_post_title($view, $post) { $author_id = $post->post_author; $author_link = get_author_posts_url($author_id); $entry_author = get_avatar( $author_id, 60 ); printf('<div class="author-avatar"><a href="%s">%s</a></div>', esc_url($author_link), $entry_author); }
Hi Elena,
You should use a custom snippet like this.
add_action('geodir_after_listing_post_title', 'avatar_geodir_after_listing_post_title'); function avatar_geodir_after_listing_post_title($view, $post) { $author_id = $post->post_author; echo get_avatar( $author_id, 60 ); }
Install this plugin, add the above snippet and then make sure to activate the snippet.
https://wordpress.org/plugins/code-snippets/
Let me know how that goes.
Thanks
PS: you may have to add soke custom css to style that part.
Maybe you can try this css.
.sd .sd-detail-info { max-width: 54% !important; }
This reply has been marked as private.You are welcome 🙂
Please make these changes
/wp-content/themes/geodirectory_whoop/functions/photos.php
Arround line 313 you will see an if else block
Please replace that part with this code.
if ($_FILES) { $permalink = get_permalink($post_id); foreach ($_FILES as $file => $array) { if ($_FILES[$file]['error'] !== UPLOAD_ERR_OK) { $error = __('Image is required', GEODIRECTORY_FRAMEWORK); } //require the needed files require_once(ABSPATH . "wp-admin" . '/includes/image.php'); require_once(ABSPATH . "wp-admin" . '/includes/file.php'); require_once(ABSPATH . "wp-admin" . '/includes/media.php'); $post_data = array( 'post_title' => $caption, 'caption' => $caption, 'post_author' => $user_id ); $attachment_id = media_handle_upload( 'biz_image', $post_id, $post_data ); if ( is_wp_error( $attachment_id ) ) { $error = __('Image upload error.', GEODIRECTORY_FRAMEWORK); } else { $row_id = geodir_insert_user_image_data($attachment_id, $post_id, $user_id); $permalink = esc_url(add_query_arg(array("biz_photos" => $row_id), get_permalink($post_id))); //$success = __('Image upload successful', GEODIRECTORY_FRAMEWORK); } } wp_redirect( $permalink ); exit; } else { $error = __('Image is required', GEODIRECTORY_FRAMEWORK); }
Let me know how that goes.
Thanks
Hi Joy,
You need to use the hook
geodir_search_content
to hook custom content there. Sorry about that.
Hi vegeta720,
That meta part differ based on theme. Supreme already displays category with icon in GD detail pages.
Hi there,
I fixed this problem a month back, but new version not released yet.
To fix the problem, Replace all instances of
'geodir-ayi'
with
'geodirevents'
In these two files.
ayi-functions.php
ayi-widgets.phpThose files can be found in events manager plugin.
Sorry for the inconvinience.
Thanks
-
AuthorPosts