Identifying Courses page in WP is_page array string
-
Hey Ken
I am using live chat to engage my visitors and promote sales.
I can select what pages to display the chat box on using WP is_page function which accepts an array string.
For example:
add_action( 'wp_footer', 'chat_add_script' ); function chat_add_script() { ?> <?php if ( is_page( [233,24,1068,1082,] ) ) : ?> <script type='text/javascript' data-cfasync='false'> ...CHAT SCRIPT IS LOCATED HERE... </script> <?php endif; ?>
My problem is that I also want to chat with customers from my LP Courses page so that I can convert more sales of my courses. If I view the LP courses page in the wp admin editor I can see a page number in the url at the top of the screen. However that number does not work if I insert it into the above array string of page ids ([233,24,1068,1082,]).
How can I configure the code above to ensure the chat box is displayed on the courses page?
Thanks for your kind assistance.
Regards
Max
- The topic ‘Identifying Courses page in WP is_page array string’ is closed to new replies.