Title: Overriding a function
Last modified: January 11, 2024

---

# Overriding a function

 *  Resolved [mitys](https://wordpress.org/support/users/mitys/)
 * (@mitys)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/overriding-a-function-2/)
 * Hello,
 * I would like to override the function “bsk_pdfm_get_pdfs_by_cat” wich is inside
   the class: “BSKPDFM_Common_Data_Source” to change the $pdf_order_by_str = ‘P.`
   last_date`‘; to “$pdf_order_by_str = ‘P.`last_date`, P.`id`‘;”. How could I achieve
   that ?
 * Thanks !

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

 *  Plugin Author [bannersky](https://wordpress.org/support/users/bannersky/)
 * (@bannersky)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/overriding-a-function-2/#post-17483768)
 * We don’t suggest you to change the codes directly. You may add your own codes
   in function.php to query PDFs yoursefl.
 * If you want to override the function just because changing order by , I suggest
   you check our document: [https://bannersky.com/document/bsk-pdf-manager/display-pdfs-documents-by-category/display-pdfs-by-category-in-list/?attrid=order](https://bannersky.com/document/bsk-pdf-manager/display-pdfs-documents-by-category/display-pdfs-by-category-in-list/?attrid=order)
 * We provide the option of order by: title, date, and custom
 *  Thread Starter [mitys](https://wordpress.org/support/users/mitys/)
 * (@mitys)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/overriding-a-function-2/#post-17491968)
 * Hello, is there a filter that I can add to edit the code of this function from
   the functions.php file ?
 * Thank you.
 *  Plugin Author [bannersky](https://wordpress.org/support/users/bannersky/)
 * (@bannersky)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/overriding-a-function-2/#post-17492239)
 * You may check all filters from: [https://bannersky.com/document/bsk-pdf-manager/filters-and-hooks/](https://bannersky.com/document/bsk-pdf-manager/filters-and-hooks/)

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

The topic ‘Overriding a function’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bsk-pdf-manager.svg)
 * [BSK PDF Manager](https://wordpress.org/plugins/bsk-pdf-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bsk-pdf-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bsk-pdf-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/bsk-pdf-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bsk-pdf-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bsk-pdf-manager/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [bannersky](https://wordpress.org/support/users/bannersky/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/overriding-a-function-2/#post-17492239)
 * Status: resolved