473,548 Members | 2,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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, 731 views)
Feb 22 '16 #1
0 1132

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

Similar topics

5
1868
by: Steve | last post by:
Hello, I've been a PHP programmer for a number of years and have just started to learn JS. My Employer (a water analysis lab) wants what should be a very simple .js written that basically takes sample hold time data from EPA regulations and spits out when a sample would expire, so we can properly label the thing. The problem is that the...
1
2753
by: panchaga | last post by:
Hi, could any one help me with this select statement. i am using as part of JSP page. i want to use wild cards as part of this select. i am getting error when i use % along with the name. rs = statement.executeQuery("SELECT * FROM lessons WHERE fname='"+ name+ "'"); Thanks
1
1725
by: foo | last post by:
i want to select a list of all user names and customer names. all names are in table 1 above. what does this sql statement look like? assume two tables: 1. t1, columns id (unique generated value), and name (some char value) for example, the t1 contains 1 customer name 1 2 customer name 2 3 user name 1 (at customer 1) 4 user name...
0
1868
by: crljenica | last post by:
I need to turn this select statement into a delete statemen. In other words, I want the results of the select statement deleted from the tables. I have never used a delete statement with a minus command. Can anyone help. SELECT item, ispecyr from itemlist where ispecyr = 79 minus select b.piitem, a.cpspecyr from contproj a, projitem b where...
1
1182
by: aakcse | last post by:
Help needed in understanding the below update statement update results_key set result = temp.tally from(
6
2224
by: Michele | last post by:
Hi there, I'm relative new to Python and I discovered that there's one single way to cycle over an integer variable with for: for i in range(0,10,1) which is equivalent to: for (i = 0; i < 10; i++) However, how this C statement will be translated in Python?
3
2339
anu401
by: anu401 | last post by:
System.out.println()---in this printing statement why we use (.)i.e dot inbetween system.out and out.println? please reply this question was asked in viva session
1
1192
by: Jonah Portas | last post by:
I cant seem to find the problem in this code... ifstream fin; fin.open("C:/Users/Josh/Desktop/TriNode/NumList.txt"); int first; fin >> first; cout << first;
1
1261
by: anand000925 | last post by:
How to convert this sql statement to storeproc? select "Dly_DC_LostSlsSnpsht_v"."PlntCd" "Plnt_Id_Cd" , "Dly_DC_LostSlsSnpsht_v"."DivCd" "Div_Cd" , "GlblCatSum"."GlblCatSumCd" "Gbl_Cat_Sum_Cd" , (coalesce("GlblCatSum"."GlblCatSumDesc", 'Unknow')) "Gbl_Cat_Sum_Desc" , "Dly_DC_LostSlsSnpsht_v"."ProdtCd" "Prod_Cd" ,...
0
7444
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7805
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6039
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5367
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3497
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3478
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1932
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1054
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.