Shop Categories


Syntax of functions.php in Agama Child theme

Home Forums Agama Pro Syntax of functions.php in Agama Child theme

Topic Resolution: Resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #6078

    I try to remove the sort order drop-down in WOOCommerce by adding a remove_action call at the end of functions.php:
    remove_action( ‘woocommerce_before_shop_loop’, ‘woocommerce_catalog_ordering’, 30 );
    It does not work.

    When I compared the syntax seems to be different in the Agama child functions.php.

    The functions.php examples I found start with <?php and end with ?>.

    In the Agama child functions.php the end tag ?> is missing.

    Is my problem related to that? If I add the ?> tag it does not work at all.

    Thanks in advance,

    • This topic was modified 6 years, 2 months ago by ov.

    Hello Martin,

    Omitting PHP close tag is common practice using by many developers.

    Omitting the closing tag is just one solution for avoiding blanks and other characters at the end of file. For example any char which is accidentally added behind the closing tag would trigger an error when trying to modify header info later.

    Omitting the closing tag is kind of “good practice” referring to many coding guidelines.

    For removing products filter you have in-build theme option to disable it, just go to:
    Appearance -> Customize -> WooCommerce -> Products Filter -> Off

    Best Regards


    The in-build theme option will remove all filters, not only the sort dropdown. I wanted to remove all, so I am fine.
    Thank you for quick help.


    I’m glad i could assist 😉


Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.