modifying the layout

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

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

Open Support Ticket
  • Author
    Posts
  • #46116

    siparker
    Buyer
    Post count: 114

    Hi

    I want to modify the layout of the details page and i have tried to read through some of the examples but im at a bit of a loss understanding the process.

    I think i understand that the pages are not made up of divs with placeholders for content but instead is made from different functions which trigger one after the other.

    I guess my question is could you do a very brief on how the detail page for example is generated. no need to go into mad detail but explain how the actual layout is controlled

    for example where is the flex container div generated that i can see in firebug.
    If i want to change the layout almost entirely do i just unset all the actions and then ahve tomake new ones for every bit i want?

    either that or could you show me anywhere that has a good explanation on how to modify themes which use functions for everything as its the first time i ahve dealt with doing soemthing this way.

    Thanks in advance for the help again.

    #46117

    Paolo
    Site Admin
    Post count: 31206

    unset all the actions and then have to make new ones for every bit i want

    That is correct.

    Example, remove the slider and rebuild it with my own style:

    1st we remove the slider adding this in our theme functions.php file:

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

    the original add_action is in function geodir_action_after_single_post, which is located in geodirectory/geodirectory_template_actions.php [Line: 1328]

    2nd we copy the function geodir_action_details_slider inside our functions.php file. We rename it to my_geodir_action_details_slider and customize it has we prefer. You can also write your own custom function from scratch…

    3rd we add the new action to add it to the template:

    add_action( 'geodir_details_main_content','my_geodir_action_details_slider',30);

    There are several examples in the forum (search for remove_action) and we are also publishing some tutorials on our blog

    This should get you started and give you a much better vision of how it works.

    Let us know how you went.

    Thanks

    #46119

    Paolo
    Site Admin
    Post count: 31206

    btw, for editing smaller bits inside the templates there are also many filters that you can use to hook into them : https://wpgeodirectory.com/docs/codex_project/geodirectory_filters/

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

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

Open Support Ticket