Author Parameter in Shortcode

This topic contains 44 replies, has 2 voices, and was last updated by  Paolo 8 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #139860

    Matt Gray
    Expired Member
    Post count: 131
    This reply has been marked as private.
    #140392

    Matt Gray
    Expired Member
    Post count: 131
    This reply has been marked as private.
    #140523

    Paolo
    Site Admin
    Post count: 31206

    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,

    #141073

    Paolo
    Site Admin
    Post count: 31206
    This reply has been marked as private.
    #145342

    Matt Gray
    Expired Member
    Post count: 131

    Hello,

    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.

    #145580

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    Yes, but I’ll do this after easter if you don’t mind.

    Thank you for reminding me after next monday.

    Thanks

    #145626

    Matt Gray
    Expired Member
    Post count: 131
    This reply has been marked as private.
    #145630

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    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

    #145685

    Matt Gray
    Expired Member
    Post count: 131
    This reply has been marked as private.
    #145686

    Matt Gray
    Expired Member
    Post count: 131

    Oh 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.

    #145687

    Matt Gray
    Expired Member
    Post count: 131

    My 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.

    #145809

    Matt Gray
    Expired Member
    Post count: 131
    This reply has been marked as private.
    #145836

    Matt Gray
    Expired Member
    Post count: 131
    This reply has been marked as private.
    #145874

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    if you need us to do it, it will be after monday.

    Or you can hire someone to do it right away.

    Thanks

    #155812

    Matt Gray
    Expired Member
    Post count: 131
    This reply has been marked as private.
Viewing 15 posts - 16 through 30 (of 45 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket