agentkiller007
Forum Replies Created
-
Forum: Plugins
In reply to: [Site Reviews] Display reviews by author on Author profile pageNo! presently i am using “Submit a review” block to display submission form
and it is only showing post_id in assign to field in “Assign to” settings in WordPress visual editor.
though now it also shows category field but with the dropdown of all the users,
it is not auto assigning reviews to any user category while form submission.I think u figured it, auto-assigning them at form submission is the solution,
Is there any way to auto-assign reviews to user who submits it?
- This reply was modified 6 years, 3 months ago by agentkiller007.
- This reply was modified 6 years, 3 months ago by agentkiller007.
Forum: Plugins
In reply to: [Site Reviews] Display reviews by author on Author profile pageIts quite silly on my side but i am working on local env… by Flywheel still if it works for u i am sending the live link
http://2726ff4c.ngrok.io/author/keto
“http://2726ff4c.ngrok.io/2019/12/02/oh-boy/”
- This reply was modified 6 years, 3 months ago by agentkiller007.
- This reply was modified 6 years, 3 months ago by agentkiller007.
- This reply was modified 6 years, 3 months ago by agentkiller007.
- This reply was modified 6 years, 3 months ago by agentkiller007.
Forum: Plugins
In reply to: [Site Reviews] Display reviews by author on Author profile pageYes i have copied it exactly and after expanding all those filter into my functions .php but it is still returning total reviews by user 0,even if he has reviews
in functions.php/** * Create a category for the user if one does not already exist * @param array $defaults * @return array */ function glsr_filter_shortcode_defaults($defaults) { $term = $defaults['category']; if (!empty($term) && !term_exists($term, glsr()->taxonomy)) { $userId = filter_var(str_replace('user_', '', $term), FILTER_VALIDATE_INT); if ($user = get_user_by('id', $userId)) { require_once ABSPATH.'wp-admin/includes/taxonomy.php'; wp_create_term($term, glsr()->taxonomy); } } return $defaults; } add_filter('site-reviews/defaults/site-reviews', 'glsr_filter_shortcode_defaults'); add_filter('site-reviews/defaults/site-reviews-form', 'glsr_filter_shortcode_defaults'); add_filter('site-reviews/defaults/site-reviews-summary', 'glsr_filter_shortcode_defaults');In author.php
<?php $userTerm = 'user_'.get_queried_object_id();?> <div>Total no. of reviews by author<?php if (is_author() && shortcode_exists('site_reviews_summary')) { echo do_shortcode('[site_reviews_summary text="Reviews {num}" schema=true hide=rating,bars,stars category='.$userTerm.']'); } ?></div>- This reply was modified 6 years, 3 months ago by agentkiller007.
- This reply was modified 6 years, 3 months ago by agentkiller007.
Forum: Plugins
In reply to: [Site Reviews] Display reviews by author on Author profile pageThanks alot for staying along….
I copied this into my template,if (is_author() && shortcode_exists('site_reviews_summary')) { $userTerm = 'user_'.get_queried_object_id(); echo do_shortcode('[site_reviews_summary text="Reviews {num}" schema=true hide=rating,bars,stars category='.$userTerm.']'); }i also debugged the value of
glsr_debug($userTerm)it output wasuser_3but reviews are not auto-assigning to user.I am required to go to my wordpress dashboard again and again to assign that user category…..
Forum: Plugins
In reply to: [Site Reviews] Display reviews by author on Author profile pageStill stuck….
I am doing this to extract user from url…..global $wp; $url = home_url($wp->request); $parts = explode("/", $url); $author_id = $parts[count($parts) - 1] ; global $wpdb; $user =''; $users = $wpdb->get_results( "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = 'first_name' AND meta_value = '".$author_id."'" ); if( $users ) { foreach ( $users as $user ) { } } else { echo 'There are no users with the specified first name.'; } ?> <?php $userTerm = 'user_{'.$user->user_id.'}' ; <div> echo $userTerm; echo do_shortcode('[site_reviews_summary text="Reviews {num}" schema=true hide=rating,bars,stars category='.$userTerm.']'); ?></div> ?>Here $author_ID is string with value ‘keto’ name of user.
also when i echo $userTerm it results user_{3} and of type string.PLs Help…
- This reply was modified 6 years, 3 months ago by agentkiller007.
- This reply was modified 6 years, 3 months ago by agentkiller007.
Forum: Plugins
In reply to: [Site Reviews] Display reviews by author on Author profile pageIt worked but it is not auto-assigning those categories to respective user on submission.Admin is required to do it manually.
I thought it in some other way –
Is there any way we can make use of(or extract) user value present in detail table i.e glsr-metabox-table on edit review screen.
As i can see newly created review automatically gets info about author under details tab on edit review screen.Forum: Plugins
In reply to: [Site Reviews] Shortcode not workingIt worked, thank u very much for your great plugin and support.Admire your kindness,thanks!!
Forum: Plugins
In reply to: [Site Reviews] UNABLE to retrieve review IDIt worked! Thanks for your quick and valuable support.
Forum: Plugins
In reply to: [Site Reviews] My Stars are not Showingwp_head() and wp_footer()….. That worked thanks alot!