how to modify detail page

This topic contains 7 replies, has 3 voices, and was last updated by  Paolo 9 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #8561

    j007w
    Free User
    Post count: 56

    Hi guys,

    How do I modify pages such as the detail page or the listing page? In the GeoTheme I’d make a copy of those files and put into the child theme directory and modify them. Do I do the same with WPDirectory?

    For example, do I copy geodiretoy_template_actions.php into the child theme to modify?

    Thanks!

    #8562

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    only templates can be moved, but you don’t really need to move them to modify them. Because you can use hooks and actions.

    geodiretoy_template_actions.php isn’t a template, is the file where the templates actions are declared.

    You can find examples of how to modify things within a template using hooks and actions search on the forum add_action and/or remove_action and or do_action.

    example: https://wpgeodirectory.com/support/topic/removing-the-share-buttons-from-listing-sidebar/

    Templates can be found in geodirectory/geodirectory_templates and have to be moved inside a geodirectory folder within your child theme to be modified.

    Thanks

    #8563

    j007w
    Free User
    Post count: 56

    Hi Paolo,

    You guys are so fast in answering questions! Just want to say I really appreciate you.

    OK, please let me know if this is correct. If I want to remove the slider in the detail page, do I put this in the function.php file under the child theme?

    remove_action('geodir_details_slider', 'geodir_action_details_slider',10,1 );

    Thanks!

    #8564

    j007w
    Free User
    Post count: 56

    Hmm…that didn’t work. I also tried adding an action to output ” but that also didn’t work.

    
    
    remove_action('geodir_details_slider', 'geodir_action_details_slider',10,1 );
    add_action('geodir_details_slider', 'geodir_action_details_slider_custom',10,1 );
    function geodir_action_details_slider_custom() {
    	echo '';	
    }

    Any thoughts? THANKS!

    #8565

    Paolo
    Site Admin
    Post count: 31206

    Hi again,

    close enough:

    
    
    
    
    remove_action( 'geodir_details_main_content', 'geodir_action_details_slider',30);
    
    

    Thx

    #8567

    j007w
    Free User
    Post count: 56

    YES! It worked!

    Thanks, Paolo!

    #18012

    frantletle
    Full Member
    Post count: 91

    Clarification:

    When you say…

    Templates can be found in geodirectory/geodirectory_templates

    you mean the full path is:

    /wp-content/plugins/geodirectory/geodirectory_templates

    The reason I ask is because I haven’t ever seen parent/child themes setup like this (not that I’ve seen them much).

    #18051

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    yes the full path is /wp-content/plugins/geodirectory/geodirectory_templates

    The way our plugin work isn’t much different from woocommerce to name one.

    The main difference is that we also made it possible to perfectly integrate GD into any theme, without having to move GD templates inside your theme.

    You can modify any template via hooks and actions in your child theme functions.php.

    Taking one of the compatibility pack we made availalbe on wordpress.org/plugins as an example is the best way to learn how this can be done.

    Thx

    Thanks

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

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

Open Support Ticket