Find Jobs
Hire Freelancers

Create a shortcode on a Wordpress plugin (WC Vendors)

$10-30 USD

已完成
已发布超过 8 年前

$10-30 USD

货到付款
I have WC vendor install on my wordpress site and I need to create a new shortcode. I need you to add a filter here so you can choose the category you want ([login to view URL]) (for COMMUNIQUE in this page for exmple the category is "Agence de Publicité". Son I need a list with all the categories so you see only the list of the category choose. Here are the code : //////////////////////////// /* list of vendors * * @param $atts shortcode attributs */ public function wcv_vendorslistsort( $atts ) { $html = ''; extract( shortcode_atts( array( 'orderby' => 'registered', 'order' => 'ASC', 'per_page' => '12', 'columns' => '4', 'show_products' => 'no' ), $atts ) ); $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; $offset = ( $paged - 1 ) * $per_page; // Hook into the user query to modify the query to return users that have at least one product if ($show_products == 'yes') add_action( 'pre_user_query', array( $this, 'vendors_with_products') ); // Get all vendors $vendor_total_args = array ( 'role' => 'vendor', 'meta_key' => 'pv_shop_slug', 'meta_value' => '', 'meta_compare' => '>', 'orderby' => $orderby, 'order' => $order, ); if ($show_products == 'yes') $vendor_total_args['query_id'] = 'vendors_with_products'; $vendor_query = New WP_User_Query( $vendor_total_args ); $all_vendors =$vendor_query->get_results(); // Get the paged vendors $vendor_paged_args = array ( 'role' => 'vendor', 'meta_key' => 'pv_shop_slug', 'meta_value' => '', 'meta_compare' => '>', 'orderby' => $orderby, 'order' => $order, 'offset' => $offset, 'number' => $per_page, ); if ($show_products == 'yes' ) $vendor_paged_args['query_id'] = 'vendors_with_products'; $vendor_paged_query = New WP_User_Query( $vendor_paged_args ); $paged_vendors = $vendor_paged_query->get_results(); // Pagination calcs $total_vendors = count( $all_vendors ); $total_vendors_paged = count($paged_vendors); $total_pages = intval( $total_vendors / $per_page ) + ( $total_vendors % $per_page ); ob_start(); // Loop through all vendors and output a simple link to their vendor pages foreach ($paged_vendors as $vendor) { wc_get_template( '[login to view URL]', array( 'shop_link' => WCV_Vendors::get_vendor_shop_page($vendor->ID), 'shop_name' => $vendor->pv_shop_name, 'vendor_id' => $vendor->ID, 'shop_description' => $vendor->pv_shop_description, ), 'wc-vendors/front/', wcv_plugin_dir . 'templates/front/' ); } // End foreach $html .= '<ul class="wcv_vendorslist">' . ob_get_clean() . '</ul>'; if ($total_vendors > $total_vendors_paged) { $html .= '<div class="wcv_pagination">'; $current_page = max( 1, get_query_var('paged') ); $html .= paginate_links( array( 'base' => get_pagenum_link( ) . '%_%', 'format' => 'page/%#%/', 'current' => $current_page, 'total' => $total_pages, 'prev_next' => false, 'type' => 'list', )); $html .= '</div>'; } return $html; } ///////////////////////End//////////////// Right Now with this code I can create a page with a shortcode like [wcv_vendorslist show_products="no"] thas show me the list of all the vendor, but I have another table called "pv_merchant_category" and I would like to be able to create a page with a shortcode like [wcv_vendorslist show_products="no" category="Barber"] thas will show me only the list of the vendors in the "Barber" category!!
项目 ID: 8661788

关于此项目

3提案
远程项目
活跃9 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
Hi Hope you are doing great. I have worked on many Wordpress Plugin and Shortcode projects. I am ready to start now, if you are interested. I would just need your Code access through FTP or CPanel and we should be done in an hour or two. Thanks
$30 USD 在1天之内
4.9 (63条评论)
5.7
5.7
3威客以平均价$23 USD来参与此工作竞价
用户头像
Dear sir, I will complete your project asap, LIFETIME error free guarantee and provide ONE YEAR support... I have gone through your outsourced requirement "Create a shortcode on a Wordpress plugin (WC Vendors)" and have analysed that I have right credentials (MySQL, PHP, Web Hosting, Wordpress) to execute your esteemed project. You will never go wrong choosing me :)
$20 USD 在1天之内
5.0 (63条评论)
5.2
5.2
用户头像
Hi, I am a Web Designer and Developer with more than 7 year experience. I have worked as Web Design & concept Consultant. I do care for concept, typo, Fonts, color culture, neatness and User friendliness presentation of the Designs. My work Standard includes: W3C Valid XHTML/HTML/HTML5 Transitional Table-less CSS markup, W3C Valid and optimized CSS 3, effective jQuery/JavaScript Compatible with IE, Firefox, Opera, Chrome, Safari and all mobile device such as tablets iPad, Android Tablet, BlackBerry Playbook and others. I have completely understand your requirement and I am sure that I have complete with best quality with your satisfaction. Let's initiate the PMB so we can discuss on different approach and provide you best solution in minimum time frame. Looking Forward work with you. Regards, WEB RSS
$20 USD 在1天之内
4.9 (7条评论)
2.2
2.2

关于客户

GUADELOUPE的国旗
Saint Martin, Guadeloupe
5.0
9
付款方式已验证
会员自12月 13, 2014起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。