Freelancer is packed with useful action hooks that allow you to easily add to and remove different sections of the framework. Below is a list of all theme-specific action hooks available in Freelancer.
freelancer_beforefreelancer_after
These hooks are located before and after the entire visible site, directly after the opening body tag and directly before the closing body tag (and right outside the .site div wrapper).
freelancer_before_headerfreelancer_headerfreelancer_after_header
These hooks are located right after the .site div (which similar to the body wrap contains the entire site, just inside the body).
freelancer_in_headerfreelancer_in_header_mainfreelancer_site_branding_logofreelancer_site_branding_textfreelancer_site_titlefreelancer_site_descriptionfreelancer_in_header_menu
These hooks are located “inside” the freelancer_header hook, providing easy add/remove capability for the various Header elements.
freelancer_before_site_contentfreelancer_after_site_content
These hooks are located before and after the entire main content area, wrapping the post/page content, sidebar, comments, etc…
freelancer_before_content_areafreelancer_after_content_areafreelancer_before_contentfreelancer_after_content
These hooks are located before and after the post/page content area only, not including the sidebar. The first two are right outside the .content-area div, while the second two are right inside that div, and right outside the .site-main div, which is the div that wraps around the loop hooks.
freelancer_before_loopfreelancer_loopfreelancer_after_loop
These hooks are located right inside the .site-main div and house all of the post/page hooks and content.
freelancer_before_whilefreelancer_after_endwhile
These hooks are located before and after the post while() loop.
freelancer_before_entryfreelancer_after_entry
These hooks are located before and after the main article element. As far as HTML is concerned these hooks are located in the same location as the before and after while() loops hooks, but as far as PHP is concerned these hooks are INSIDE the loop while the before/after while hooks are OUTSIDE the loop.
freelancer_entry_headerfreelancer_inside_entry_headerfreelancer_post_meta_top
The entry header hook is located at the beginning of the post area, right before the entry content. The inside entry header and post meta top hooks are located “inside” the entry header hook.
freelancer_entry_headerfreelancer_inside_entry_footerfreelancer_post_meta_bottom
The entry footer hook is located at the end of the post area, right after the entry content. The inside entry footer and post meta bottom hooks are located “inside” the entry footer hook.
freelancer_before_entry_contentfreelancer_entry_contentfreelancer_after_entry_content
The outer two of these hooks are located in essentially the same areas, structurally, as the entry header/footer hooks, but they come right after and right before those hooks. They could be seen as a bit redundant, but for consistency in naming and ease of remembering locations, they’re included. The freelancer_entry_content hook is located right inside the .entry-content div and house all of the core post/page content hooks and content.
freelancer_404_entry_contentfreelancer_no_entry_content
These hooks are located after the endwhile hook (therefore outside the post loop) and outside the article container. They are basically there for hooking in content to display when a page is not found (404) or there is no other content to display.
freelancer_before_commentsfreelancer_commentsfreelancer_after_commentsfreelancer_before_comment_formfreelancer_comment_formfreelancer_after_comment_form
These hooks are located right inside the .comments-area div and are used to build out both the main comments and comment form elements.
freelancer_before_sidebarfreelancer_sidebarfreelancer_after_sidebar
These hooks are located right inside the aside.sidebar.widget-area wrapper.
freelancer_before_footerfreelancer_footerfreelancer_after_footerfreelancer_in_footerfreelancer_credits
These hooks are located right outside the .site-content-container div and right inside the closing .site div. The main before/footer/after hooks are using to build out the main footer area, while the in footer and credits hooks are located “inside” the freelancer_footer hook.