424,301 Members | 1,287 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,301 IT Pros & Developers. It's quick & easy.

How do I add more than one post id to this "if" statement?

P: 1
Hi guys, forgive my ignorance with php but I am learning as I go along. I copied this social media code for my wordpress website to try and avoid using a plugin and it works fine but I wanted to exclude some post/page ids from the code showing on my site and tried this:
Expand|Select|Wrap|Line Numbers
  1. if(is_singular() && !is_page(14,17,223)){  // sample: 234 is a page id
. It works with just one id but not more. I've attached the function as a text file in case you need to see the whole code. Thanks for your help.
Attached Files
File Type: txt socialmediafunction.txt (2.7 KB, 326 views)
Feb 22 '16 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.