I want to add my own option to Ajax Categories Dropdown (basically a custom link to a category, much like the block header itself).
What file/hook can I edit to achieve that simple thing?
For now, my only option is JS or bad practice like editing
plugins/td-composer/legacy/Newspaper/includes/block_templates/td_block_template_1.php
Alternatively, would be nice if I can select No Filter dropdown and still set Filter dropdown text with link equal to Title url
-
This topic was modified 5 years by
ibasher. Reason: styling
Hello!
Unfortunately, all javascript files from our theme get combined into a bigger, minified javascript file which gets delivered to the client and original files get removed from the package. So, even though you edit the original files, they will not get recompiled at all and so the changes will not take effect to your website.
For customization and other services you can contact our custom work team here: https://tagdiv.com/premium-customization-services/
Thank you for your understanding!
Well, that was totally possible by using td_api_plugin. I just copied original file, mage some tweaks and rerouted system to a new file.
`
class td_api_plugin
{
var $plugin_url = '';
var $plugin_path = '';
function __construct()
{
$this->plugin_url = plugins_url('', __FILE__); // path used for elements like images, css, etc which are available on end user
$this->plugin_path = dirname(__FILE__); // used for internal (server side) files
add_action('td_global_after', array($this, 'hook_td_global_after')); // hook used to add or modify items via Api
}
function hook_td_global_after()
{
td_api_block_template::update_key('td_block_template_1', 'file', $this->plugin_path . '/includes/block_templates/td_block_template_1.php');
}
}
new td_api_plugin();
`