• Home
  • Plugins
    • BSK PDF Manager
    • BSK Forms Blacklist
    • Gravity Forms Custom Validation
    • Contact Form 7 to Zoho
    • Contact Form 7 Blacklist
  • Documentations
    • BSK PDF Manager
    • BSK Forms Blacklist
    • Gravity Forms Custom Validation
    • Contact Form 7 to Zoho
    • Contact Form 7 Blacklist
  • Blog
  • Contact Us
  • Your Account
    • Purchase History
    • Checkout

Filter: bsk_pdfm_filter_sub_cat_title

All filters and hooks should be placed in your active theme’s functions.php file

bsk_pdfm_filter_sub_cat_title

Use this filter to change the sub-categories' title or title structure. You may use category id or depth to make it only applied for specific sub-category. Default sub-category title structure is as the following:

<h2 class="bsk-pdfm-cat-titile">Sub-category Title</h2>

Example

/**
 * Change the text or structure of sub-category title
 * @var String $sub_cat_title_structure The default sub-category title structure
 * @var Integer $cat_id The category id
 * @var String $sub_cat_title The category title
 * @var Integer $depth The depth of current category
 * @return String The new sub-category title structure
 */
add_filter( "bsk_pdfm_filter_sub_cat_title", "change_sub_category_title", 10, 4 );
function change_sub_category_title( $sub_cat_title_structure, $cat_id, $sub_cat_title, $depth ) {
    if( $cat_id == 9 ){
        return '<h2 class="documentation-title-red">New Arrivals: '.$cat_title.'</h2>';
    }

    if( $depth == 2 ){
        return '<h3 class="documentation-title-blue">'.$cat_title.'</h3>';
    }

    if( $depth == 3 ){
        return '<h4 class="documentation-title-yellow">'.$cat_title.'</h4>';
    }
}

Installation

  • How to install free version
  • How to install Pro version
  • How to upgrade to Pro version
  • Settings

    • Set Upload Directory
    • Multiple document formats
    • Featured image settings
    • Sort PDFs / documents by date / title / custom / last modified
    • Hierarchical Category
    • Upload

      • Upload PDF / Document
      • Bulk Upload by FTP
      • Bulk add by Media Library
      • Display all / specific

        • In list
        • In columns
        • In dropdown
        • Get specific PDFs' link only
        • Get specific PDFs' URL only
        • Display by category

          • In list
          • In columns
          • In dropdown
          • Display with category selector

            • In list
            • In columns
            • In dropdown

            Hooks

            • Hooks

            FAQ

            • FAQ
  • Licensing
  • Refund Policy
  • Affiliate Area

 

Copyright © 2021 BannerSky

BannerSky