Apply Online Reference

Custom theme template

Ads archive page(listing page) & ad detail page(single page) are completely customizable . For complete custom structure you can create archive template file archive-aol_ad.php and single template file single-aol_ad.php in your theme with your own HTML structure.

For custom ad types which you define in plugin’s settings, you need to create custom template files accordingly i. e. archive-aol_CustomType.php & single-aol_CustomType.php. Replace CustomType keyword according to ad type.

Three functions are available to get content of an application on single template file:

  1. aol_features($post_id)
    $post_id (integer)(optional) Default: Current Post ID.
    This functions returns features of an application in string format.
  2. aol_form($post_id)
    $post_id (integer)(optional) Default: Current Post ID.
    This functions returns application form in string format.
  3. aol_form_fields($post_id)
    $post_id (integer)(optional) Default: Current Post ID.
    This function returns associative array of application form fields. Application form field’s KEY, TYPE and OPTIONS are returned.

IMPORTANT: when using one or more of above function, you *must* check for its existence before using it, otherwise your site may badly break with a fatal error at next Plugin update .


apply_filters( ‘aol_content’, $content, $features, $form )

This filter hook can be used to modify the output of [aol] shortcode. This hook returns $content. You can use this filter hook in your theme’s functions.php file in this way:

add_filter('aol_content', 'my_custom_function', 10, 3);
function my_custom_function( $content, $features, $form ){
//Modiy $content here
return $content;
}


do_action(‘aol_after_form_fields’);

This hook is used to append content i. e. custom input fields, at the end of an application form. For compatibility with existing user interface, add class form-control to the input and textarea HTML elements and wrap newly created elements in a div with class form-group


apply_filters(‘aol_upload_folder’, $upload_folder);

This filter hook is used to change the folder of file attachments. The parent folder is wp-content.
$upload_folder (string) A folder location within wp-content folder. Default is uploads/aol