How to add code in custom_functions.php extrenally

This topic contains 9 replies, has 4 voices, and was last updated by  Stiofan O’Connor 5 years, 3 months ago.

  • Author
    Posts
  • #55924

    shruti jain
    Free User
    Post count: 29

    Hey there,
    I wanted to add the “more info sidebar data” in the “geodirectory tab” in the “details page”.

    For that purpose I was adding some code in “custom_functions.php” in “geodir_show_detail_page_tabs (line 1309)”. I simply added an “echo geodir_detail_page_more_info();” in the switch statement of the above mentioned function in case “post_profile” after the “the_content()” i.e. after line 1484.

    The problem is when I update the plugin, I’ve to add these line of code manually. I was thinking of creating a function in which I can manually override the existing function and add this code so that when I update the plugin I don’t have to add the same code again.

    I’ve tried several option but had no luck so far, any help is much appreciated.

    Thanks in advance.

    #55926

    Stiofan O’Connor
    Site Admin
    Post count: 22954

    Hello,

    I am not sure what you are trying to do is the best solution but this one line of code in your theme functions should do what you want.

    
    
    
    add_action('geodir_after_description_on_listing_detail','geodir_detail_page_more_info',10);
    

    Thanks,

    Stiofan

    #55968

    Paolo
    Site Admin
    Post count: 31205

    Not sure why code is cut off.

    In case that is unreadable:

    add_action(‘geodir_after_description_on_listing_detail’,’geodir_detail_page_more_info’,10);

    Thanks

    #56031

    shruti jain
    Free User
    Post count: 29

    Thanks for the reply, you saved my day. It’s working perfectly now.

    Just one more thing, in listing and details page the footer is inside the container when in fact it should be outside the container. I tried a workaround and added the “geodir_detail_sidebar” between the “geodir_wrapper_content_close” and the “geodir_wrapper_close” function in “listing-details.php” and set it’s property as “display: none”.

    Is there another way to accomplish the same. I’ve checked the theme already and the footer is outside the container in the core theme.

    Thanks.

    #56044

    Stiofan O’Connor
    Site Admin
    Post count: 22954

    We would at least need to know what theme you are using and preferably have wp-admin access so we can fix it.

    Thanks,

    Stiofan

    #56180

    shruti jain
    Free User
    Post count: 29

    Hey Stiofan,
    Currently I am working on Divi and I have already checked the compaibility of your plugin with this theme. Also, I am working on my localhost so won’t be able to provide you credentials. I tried to make changes in the core plugin but it doesn’t seem to be perfect solution for this issue.

    Thanks

    #56221

    jeaniusmktg
    Free User
    Post count: 33

    I need this as well.

    #56249

    Paolo
    Site Admin
    Post count: 31205

    Divi should be compatible out of the box.

    Please at least provide screenshot of the problems you are referring to.

    Thanks

    #56285

    shruti jain
    Free User
    Post count: 29
    This reply has been marked as private.
    #56313

    Stiofan O’Connor
    Site Admin
    Post count: 22954

    Hello, can you provide wp-admin details in a private reply please?

    Thanks,

    Stiofan

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘How to add code in custom_functions.php extrenally’ is closed to new replies, this may be for inactivity, please open a new topic if you have a similar question.