Author Parameter in Shortcode
This topic contains 44 replies, has 2 voices, and was last updated by Paolo 10 years, 1 month ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
March 14, 2016 at 10:36 pm #139860This reply has been marked as private.March 15, 2016 at 7:01 pm #140392This reply has been marked as private.March 15, 2016 at 10:24 pm #140523
Hi,
I’ve added the new tab in contractor listings and the shortcode with the new parameter, however for some reasons it is returning no results. It seems that the post_type parameter is not working well with the new post_author parameter.
I’ve asked to the developers to double check and he’ll let us know asap.
Thanks for your patience,
March 16, 2016 at 4:31 pm #141073This reply has been marked as private.March 24, 2016 at 1:03 am #145342Hello,
I hate to ask you again for help. I had to change themes. Nothing was working the way I wanted it to. So, this one will work. The problem is that you put some custom code in the child theme and I tried to copy and paste it over. No luck! Sorry!
Can you put it where it’s supposed to go? I appreciate the help. Thanks. Here is the original code below. I am using the One Social Child Theme now.
March 24, 2016 at 4:02 pm #145580Hi,
Yes, but I’ll do this after easter if you don’t mind.
Thank you for reminding me after next monday.
Thanks
March 24, 2016 at 6:33 pm #145626This reply has been marked as private.March 24, 2016 at 7:12 pm #145630Hi,
the code I added is:
error_reporting(E_ERROR); add_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend') ; function geodir_detail_page_tab_list_extend($tab_array) { if ( 'gd_place' == get_post_type() ) { $tab_array['projects'] = array( 'heading_text' => __('Projects',GEODIRECTORY_TEXTDOMAIN), 'is_active_tab' => false, 'is_display' => apply_filters('geodir_detail_page_tab_is_display', true,'projects'), 'tab_content' => ''); return $tab_array ; } else {return $tab_array ;} } add_action('geodir_after_tab_content' ,'geodir_my_new_tab_content'); function geodir_my_new_tab_content($tab_index) { if($tab_index =='projects') {echo do_shortcode('[gd_listings post_type="gd_contractor_projec" post_author="current" post_number="10" add_location_filter="0"]');} }You have to add it below CUSTOM FUNCTIONS and above ?>
Let us know how you went,
Thanks
March 25, 2016 at 12:28 am #145685This reply has been marked as private.March 25, 2016 at 12:33 am #145686Oh shit… Now I’m in trouble. I can’t even get on the site now. It’s crashed.
Is there anyway you can get me back up? Sorry. I shouldn’t have done this but I did exactly what the email above said.
March 25, 2016 at 12:35 am #145687My credentials on the server are on the first page of this feed. Let me know when you can as I’m stuck now.
Thanks you.
March 25, 2016 at 12:12 pm #145809This reply has been marked as private.March 25, 2016 at 12:33 pm #145836This reply has been marked as private.March 25, 2016 at 1:59 pm #145874Hi,
if you need us to do it, it will be after monday.
Or you can hire someone to do it right away.
Thanks
April 1, 2016 at 4:30 pm #155812This reply has been marked as private. -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket