Support » Plugin: Advanced AJAX Product Filters » Cannot override templates in child theme

  • jesse4liberate

    (@jesse4liberate)


    Hi devs,
    I am attempting to override the select.php template found in the plugin folder under plugins/woocommerce-ajax-filters/templates/filters/.
    I have done as recommended and put an identically named file in my child theme under themes/<my child theme>/woocommerce-ajax-filters/filters/, but it is not overriding. Just to be thorough, I have also tried:

    – Putting the file directly under themes/<my child theme>/woocommerce-ajax-filters
    – Putting the file under themes/<my child theme>/woocommerce-ajax-filters/templates/select
    – Changing the folder name to the one found in the file’s header: “woocommerce-ajax_filters”, (note underscore) considering for a moment that maybe it isn’t a typo
    – Putting all of the above variations in the parent theme, then, when that didn’t work, making that the active theme (which didn’t work either)

    I’m out of ideas. Any suggestions please?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author RazyRx

    (@razyrx)

    Hello,

    Correct path to override file is woocommerce-ajax_filters/filters/select.php in theme directory.

    But we do not recommend to override it, better to use hook BeRocket_AAPF_template_full_content to change template.

    Regards,
    Oleg

    Thread Starter jesse4liberate

    (@jesse4liberate)

    Hi Oleg,

    I appreciate your reply.

    However, putting an override template file at that path definitely does not work.

    And unfortunately, it doesn’t look like that hook will allow me to do what I need to do. I want to change the content dynamically, based on the properties of the product on each iteration of the loop – not change already formatted content after the fact.

    Thanks anyway.

    Jesse

    Plugin Author RazyRx

    (@razyrx)

    Hello,

    Checked this path and it work correct.
    Are you sure that you need select.php template?

    Directory with name woocommerce-ajax_filters must be created inside main theme directory, then directory filters inside woocommerce-ajax_filters, and inside filters create needed template.

    select.php is template for filters where style is set to “Select”.

    Regards,
    Oleg

    Thread Starter jesse4liberate

    (@jesse4liberate)

    Hi,

    I gave it one more try. I think there must have been some caching last time I tried it under woocommerce-ajax_filters/filters because this time it worked. Thanks!

    Jesse

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot override templates in child theme’ is closed to new replies.