wsc_get_template()
@param string $template_name
@param array $args (default: array() )
@param string $template_path: Path of the template (default: ‘ ‘)
@param string $default_path: Default path of any template if $template_path is not found (default: ‘ ‘)
Example:
function classified_comments( $comment, $args, $depth ) { wsc_get_template( 'single-aditem/review.php', array('comment' => $comment), 'includes/' ); }
Get theme provided, plugin defaults or custom templates (e.g. item attributes) passing attributes and including the file.
$located = apply_filters('wsc_get_template', $located, $template_name, $args, $template_path, $default_path );
Change the parameters of the located file with your required values via this filter
do_action( 'classified_before_template_part', $template_name, $template_path, $located, $args );
A blank action hook triggered before the template specified is included. Developers can hook any function to this hook and trigger the hooked function before the $located (template located) is included.
do_action( 'classified_after_template_part', $template_name, $template_path, $located, $args );
A blank action hook triggered after the template specified is included. Developers can hook any function to this action and trigger the hooked function after the $located (template located) is included.
Get other theme provided, plugin defaults or custom template-patrs (e.g. item attributes) passing attributes and including the file.
@param string $slug [description]
@param string $name [description]
Classified plugin is a easy to comprehend and extend, the templates that the plugin provides for front end display can be modified easily. There are basically two ways the templates can be overridden i.e. Trough hooks and Direct overriding. Both methods are easy and simple and is explained below.
With Classified plugin you can directly modify the templates just by coping the templates into your theme folder.
A basic procedure but a mandatory for direct template overriding is that the template must be situated into your
/wp-content/themes/your-theme/classified/
folder and should have the same folder structure as it is on the plugin template directory located at
/wp-content/plugins/classified/templates/
For example, if you would like to change the div structure or anything related to the title of the single ad item, you will just have to copy and paste the title.php on
/wp-content/themes/your-theme/classified/single-aditem/
and change/modify the template as per your requirement.
This process is simple and efficient. You can modify all available templates, the html structure, CSS classes and if correctly manged PHP scripts.
Modification through hooks is also a simple process but requires some understanding of action hooks in WordPress. With hooks you can not only modify the existing templates or functions to display the templates but you can also add new functions on the plugin given hooks as per your requirement.
For example, if your would want to remove the default title of a single ad item and add your own function to display the title, on the functions.php of your theme file you can simply remove the default action hooked and add your own.
function twentysixteen_custom_singlead_title(){ echo "My custom Single Title"; } remove_action( 'classified_before_main_content', 'classified_template_single_title', 20, 0 ); add_action( 'classified_before_main_content', 'twentysixteen_custom_singlead_title', 20);
You can also add your functions to the hooks alongside the existing function,
function twentysixteen_custom_singlead_title(){ echo "<span>My custom Single Title with the default title</span>"; } add_action( 'classified_before_main_content', 'twentysixteen_custom_singlead_title', 20);
Name | File |
---|---|
classified_aditem_supports | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_gallery_attachment_ids | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_files | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_file | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_file_download_path | includes/abstracts/abstract-wsc-aditem.php |
classified_is_virtual | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_needs_shipping | includes/abstracts/abstract-wsc-aditem.php |
classified_is_sold_individually | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_title | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_parent | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_is_visible | includes/abstracts/abstract-wsc-aditem.php |
classified_get_sale_price | includes/abstracts/abstract-wsc-aditem.php |
classified_get_regular_price | includes/abstracts/abstract-wsc-aditem.php |
classified_get_price | includes/abstracts/abstract-wsc-aditem.php |
classified_get_price_suffix | includes/abstracts/abstract-wsc-aditem.php |
classified_sale_price_html | includes/abstracts/abstract-wsc-aditem.php |
classified_price_html | includes/abstracts/abstract-wsc-aditem.php |
classified_empty_price_html | includes/abstracts/abstract-wsc-aditem.php |
classified_free_sale_price_html | includes/abstracts/abstract-wsc-aditem.php |
classified_free_price_html | includes/abstracts/abstract-wsc-aditem.php |
classified_get_price_html | includes/abstracts/abstract-wsc-aditem.php |
classified_get_price_html_from_text | includes/abstracts/abstract-wsc-aditem.php |
classified_get_price_html_from_to | includes/abstracts/abstract-wsc-aditem.php |
classified_product_review_count | includes/abstracts/abstract-wsc-aditem.php |
classified_get_aditem_attributes | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_length | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_width | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_height | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_weight | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_dimensions | includes/abstracts/abstract-wsc-aditem.php |
‘classified_get_related_’ . $term . ‘_terms’ | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_related_posts_relate_by_category | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_related_posts_relate_by_tag | includes/abstracts/abstract-wsc-aditem.php |
classified_aditem_related_posts_query | includes/abstracts/abstract-wsc-aditem.php |
plugin_locale | classified.php |
classifieds_template_path | classified.php |
classified_show_admin_notice | includes/admin/class-wsc-admin-notices.php |
classified_get_settings_pages | includes/admin/class-wsc-admin-settings.php |
classified_settings_tabs_array | includes/admin/class-wsc-admin-settings.php |
classified_admin_settings_sanitize_option | includes/admin/class-wsc-admin-settings.php |
classified_admin_settings_sanitize_option_$option_name | includes/admin/class-wsc-admin-settings.php |
classified_admin_contact_information_fields | /includes/admin/meta-boxes/class-wsc-meta-box-aditem-contact-information.php |
classified_admin_other_information_fields | /includes/admin/meta-boxes/class-wsc-meta-box-aditem-other-information.php |
classified_aditem_short_description_editor_settings | /includes/admin/meta-boxes/class-wsc-meta-box-aditem-short-description.php |
classified_general_settings | /includes/admin/settings/class-wsc-settings-general.php |
‘classified_get_settings_’ . $this->id | /includes/admin/settings/class-wsc-settings-general.php |
‘classified_get_settings_’ . $this->id | /includes/admin/settings/class-wsc-settings-page.php |
‘classified_get_sections_’ . $this->id | /includes/admin/settings/class-wsc-settings-page.php |
‘classified_settings_form_method_tab_’ . $current_tab | /includes/admin/views/html-admin-settings.php |
classified_aditem_class | /includes/class-wsc-aditem-factory.php |
classified_aditem_object | /includes/class-wsc-aditem-factory.php |
classified_aditem_title | /includes/class-wsc-aditem-simple.php |
classified_get_breadcrumb | /includes/class-wsc-breadcrumb.php |
classified_breadcrumb_main_term | /includes/class-wsc-breadcrumb.php |
classified_delete_version_transients_limit | includes/class-wsc-cache-helper.php |
classified_font_awesome_file_path | /includes/class-wsc-fields.php |
classified_aditem_metaboxes | /includes/class-wsc-form.php |
classified_aditem_category_metaboxes | /includes/class-wsc-form.php |
classified_enqueue_styles | /includes/class-wsc-frontend-scripts.php |
classified_docs_url | /includes/class-wsc-install.php |
classified_support_url | /includes/class-wsc-install.php |
classified_post_type | /includes/class-wsc-post-types.php |
loop_aditem_shop_post_in | /includes/class-wsc-query.php |
loop_aditem_shop_per_page | /includes/class-wsc-query.php |
classified_unfiltered_aditem_ids | /includes/class-wsc-query.php |
classified_default_catalog_orderby | /includes/class-wsc-query.php |
classified_get_catalog_ordering_args | /includes/class-wsc-query.php |
classified_is_layered_nav_active | /includes/class-wsc-query.php |
classified_layered_nav_default_query_type | /includes/class-wsc-query.php |
classified_layered_nav_query_post_ids | /includes/class-wsc-query.php |
classified_price_filter_results | /includes/class-wsc-query.php |
classified_price_filter_results | /includes/class-wsc-query.php |
classified_price_filter_meta_keys | /includes/class-wsc-query.php |
classified_category_taxonomy | /includes/class-wsc-taxonomies.php |
classified_location_taxonomy | /includes/class-wsc-taxonomies.php |
classified_tag_taxonomy | /includes/class-wsc-taxonomies.php |
widget_title | /includes/widgets/class-wsc-widget-aditem-search.php |
classified_placeholder_img_src | /includes/wsc-aditem-functions.php |
classified_placeholder_img | /includes/wsc-aditem-functions.php |
is_classified | /includes/wsc-conditional-functions.php |
classified_is_filtered | /includes/wsc-conditional-functions.php |
‘classified_get_’ . $page . ‘_page_id’ | /includes/wsc-core-functions.php |
‘classified_get_’ . $page . ‘_page_permalink’ | /includes/wsc-core-functions.php |
wsc_get_template | /includes/wsc-core-functions.php |
wsc_get_template_part | /includes/wsc-core-functions.php |
classified_locate_template | /includes/wsc-core-functions.php |
‘classified_get_image_size_’ . $image_size | /includes/wsc-core-functions.php |
classified_currency | /includes/wsc-core-functions.php |
classified_currencies | /includes/wsc-core-functions.php |
classified_currency_symbols | /includes/wsc-core-functions.php |
classified_currency_symbol | /includes/wsc-core-functions.php |
classified_search_form | /includes/wsc-core-functions.php |
classified_format_content | /includes/wsc-formatting-functions.php |
classified_price_format | /includes/wsc-formatting-functions.php |
wsc_price_args | /includes/wsc-formatting-functions.php |
raw_classified_price | /includes/wsc-formatting-functions.php |
formatted_classified_price | /includes/wsc-formatting-functions.php |
classified_price_trim_zeros | /includes/wsc-formatting-functions.php |
wsc_price | /includes/wsc-formatting-functions.php |
classified_date_format | /includes/wsc-formatting-functions.php |
aditem_category_class | /includes/wsc-template-functions.php |
classified_page_title | /includes/wsc-template-functions.php |
classified_breadcrumb_defaults | /includes/wsc-template-functions.php |
classified_breadcrumb_home_url | /includes/wsc-template-functions.php |
classified_get_aditem_terms | /includes/wsc-term-functions.php |
classified_show_page_title | /templates/archive-aditem.php |
loop_shop_columns | /templates/content-aditem.php |
classified_loop_add_to_cart_link | /templates/loop/add-to-cart.php |
classified_pagination_args | /templates/loop/pagination.php |
classified_sale_flash | /templates/loop/sale-flash.php |
classified_product_review_list_args | /templates/single-aditem-reviews.php |
classified_comment_pagination_args | /templates/single-aditem-reviews.php |
classified_product_review_comment_form_args | /templates/single-aditem-reviews.php |
single_aditem_large_thumbnail_size | /templates/single-aditem/aditem-image.php |
classified_single_aditem_image_html | /templates/single-aditem/aditem-image.php |
classified_single_aditem_image_html | /templates/single-aditem/aditem-image.php |
classified_aditem_thumbnails_columns | /templates/single-aditem/aditem-thumbnails.php |
single_aditem_small_thumbnail_size | /templates/single-aditem/aditem-thumbnails.php |
classified_single_aditem_image_thumbnail_html | /templates/single-aditem/aditem-thumbnails.php |
classified_single_description_title | /templates/single-aditem/description.php |
classified_review_gravatar_size | /templates/single-aditem/review.php |
classified_short_description | /templates/single-aditem/short-description.php |
classified_aditem_description_heading | /templates/single-aditem/tabs/contact-info.php |
classified_aditem_description_heading | /templates/single-aditem/tabs/description.php |
classified_aditem_tabs | /templates/single-aditem/tabs/tabs.php |
‘classified_aditem_’ . $key . ‘_tab_title’ | /templates/single-aditem/tabs/tabs.php |
classified_error_messages | includes/class-wsc-user.php |
classified_cron_interval | includes/class-wsc-install |
classified_cron_display | includes/class-wsc-install |
Name | File |
---|---|
classified_loaded | classified.php |
before_classified_init | classified.php |
classified_init | classified.php |
‘classified_hide_’ . $hide_notice . ‘_notice’ | /includes/admin/class-wsc-admin-notices.php |
‘classified_settings_save_’ . $current_tab | /includes/admin/class-wsc-admin-settings.php |
‘classified_update_options_’ . $current_tab | /includes/admin/class-wsc-admin-settings.php |
classified_update_options | /includes/admin/class-wsc-admin-settings.php |
classified_settings_saved | /includes/admin/class-wsc-admin-settings.php |
classified_settings_start | /includes/admin/class-wsc-admin-settings.php |
‘classified_settings_’ . sanitize_title( $value[‘id’] | /includes/admin/class-wsc-admin-settings.php |
‘classified_settings_’ . sanitize_title( $value[‘id’] ) . ‘_end’ | /includes/admin/class-wsc-admin-settings.php |
‘classified_settings_’ . sanitize_title( $value[‘id’] ) . ‘_after’ | /includes/admin/class-wsc-admin-settings.php |
‘classified_admin_field_’ . $value[‘type’] | /includes/admin/class-wsc-admin-settings.php |
‘classified_update_option_’ . sanitize_title( $option[‘type’] ) | /includes/admin/class-wsc-admin-settings.php |
classified_update_option | /includes/admin/class-wsc-admin-settings.php |
classified_admin_order_data_after_billing_address | /includes/admin/meta-boxes/class-wsc-meta-box-aditem-contact-information.php |
classified_admin_order_data_after_billing_address | /includes/admin/meta-boxes/class-wsc-meta-box-aditem-other-information.php |
‘classified_update_options_’ . $this->id . ‘_’ . $current_section | includes/admin/settings/class-wsc-settings-page.php |
classified_settings_tabs | /includes/admin/views/html-admin-settings.php |
‘classified_sections_’ . $current_tab | /includes/admin/views/html-admin-settings.php |
‘classified_settings_’ . $current_tab | /includes/admin/views/html-admin-settings.php |
‘classified_settings_tabs_’ . $current_tab | /includes/admin/views/html-admin-settings.php |
classified_grouped_aditem_sync | /includes/class-wsc-aditem-simple.php |
classified_updated | /includes/class-wsc-install.php |
classified_installed | /includes/class-wsc-install.php |
classified_register_post_type | /includes/class-wsc-post-types.php |
classified_aditem_query | /includes/class-wsc-query.php |
classified_register_taxonomy | /includes/class-wsc-taxonomies.php |
classified_before_template_part | /includes/wsc-core-functions.php |
classified_after_template_part | /includes/wsc-core-functions.php |
classified_before_main_content | /templates/archive-aditem.php |
classified_archive_description | /templates/archive-aditem.php |
classified_before_shop_loop | /templates/archive-aditem.php |
classified_loop_start | /templates/archive-aditem.php |
classified_loop_end | /templates/archive-aditem.php |
classified_after_items_loop | /templates/archive-aditem.php |
classified_after_main_content | /templates/archive-aditem.php |
classified_sidebar | /templates/archive-aditem.php |
classified_before_shop_loop_aditem | /templates/content-aditem.php |
classified_before_shop_loop_aditem_title | /templates/content-aditem.php |
classified_shop_loop_aditem_title | /templates/content-aditem.php |
classified_after_shop_loop_aditem_title | /templates/content-aditem.php |
classified_after_shop_loop_aditem | /templates/content-aditem.php |
classified_before_subcategory | /templates/content-aditem_category.php |
classified_before_subcategory_title | /templates/content-aditem_category.php |
classified_shop_loop_subcategory_title | /templates/content-aditem_category.php |
classified_after_subcategory_title | /templates/content-aditem_category.php |
classified_after_subcategory | /templates/content-aditem_category.php |
classified_before_single_aditem | /templates/content-single-aditem.php |
classified_before_single_aditem_summary | /templates/content-single-aditem.php |
classified_single_aditem_summary | /templates/content-single-aditem.php |
classified_after_single_aditem_summary | /templates/content-single-aditem.php |
classified_after_single_aditem | /templates/content-single-aditem.php |
classified_before_main_content | /templates/single-aditem.php |
classified_after_main_content | /templates/single-aditem.php |
classified_sidebar | /templates/single-aditem.php |
classified_aditem_thumbnails | /templates/single-aditem/aditem-image.php |
classified_aditem_meta_start | /templates/single-aditem/meta.php |
classified_aditem_meta_end | /templates/single-aditem/meta.php |
classified_review_before_comment_meta | /templates/single-aditem/review.php |
classified_review_before_comment_text | /templates/single-aditem/review.php |
classified_review_after_comment_text | /templates/single-aditem/review.php |
classified_forget_password_form | /includes/class-wsc-user.php |
classified_login_form | /includes/class-wsc-user |
classified_user_profile | /includes/class-wsc-user.php |
allow_password_reset | /includes/class-wsc-user.php |
retrieve_password_title | /includes/class-wsc-user.php |
retrieve_password_message | /includes/class-wsc-user.php |
classified_frontend_submission_fields | /includes/form/field-generator.php |
aditem_item_information_fields | /includes/form/field-generator.php |
get_fields_aditem_item_information | /includes/form/field-generator.php |
aditem_category_items_fields | /includes/form/field-generator.php |
get_aditem_category_items_fields | /includes/form/field-generator.php |
classified_tmp_post_status | /includes/form/gallery.php |
classified_aditem_disclaimer_heading | /templates/single-aditem/tabs/tabs.php |
classified_aditem_terms_and_condition_heading | /templates/single-aditem/tabs/terms-and-condition.php |