Last active
August 22, 2024 16:35
-
-
Save AchalJ/06ea293fdeb7affad2b5d54b6a4383c3 to your computer and use it in GitHub Desktop.
PowerPack Advanced Accordion - Get items from ACF Repeater on the current taxonomy page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php // <-- ignore this line. | |
| // If you've ACF repeater field setup for the taxonomy then | |
| // Add this code to your current theme's functions.php file. | |
| add_filter( 'pp_accordion_acf_post_id', function( $post_id, $settings ) { | |
| if ( is_tax() ) { | |
| $post_id = get_queried_object(); | |
| } | |
| return $post_id; | |
| }, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment