filter code is not working for me
-
Hello,
Your plugin seems nice for what I would like to do. I have a gallery on one page that needs custom links. So I would like it to work on that page only:
I add it to the function.php file and changed the id, but it doesnt work. You said something under it, that get_the_ID (); could not be the right function, but how would I know? I inspected the page and it has page-id-5448. So it should work then right. I mean the page that has the custom links is the only one it should be enabled on right? Thank you in advance for your answer.
add_filter( 'gallery_custom_links_enabled', 'my_gallery_custom_links_enabled', 25, 1 ); function my_gallery_custom_links_enabled( $isEnabled ) { $id = get_the_ID(); if ( $id === 5448 ) return true; return false; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘filter code is not working for me’ is closed to new replies.