- This topic has 9 replies, 3 voices, and was last updated 5 years, 10 months ago by
Leo.
-
AuthorPosts
-
November 15, 2017 at 3:09 pm #425444
Alan
Hi lads,
I have had the slider on my website excluded from loading on my contact page
but I have changed something and now it is INCLUDED.Using GP Premium 1.4.3
Here is the code
<?php if ( ! is_page( 35 ) ) : ?> [huge_it_slider id="3"] <?php endif; ?> <div class="hook-slider"> <huge_it_slider id="3"> </div> <?php if ( ! is_page( 35 ) ) : ?> <div class="hook-logos"> Payments accepted with </div> <div class="hook-logos"> <img src="http://-.biz/wp-content/uploads/2017/11/Bitcoin_logo.jpg"> <img src="http://-.biz/wp-content/uploads/2017/11/Byteball-logo.jpg"> <img src="http://-.biz/wp-content/uploads/2017/11/phore-logo.jpg"> <img src="http://-.biz/wp-content/uploads/2017/11/pivx-logo.jpg"> </div> <?php endif; ?>
November 15, 2017 at 4:49 pm #425493Leo
StaffCustomer SupportHi there,
Looks like you added the slider twice and one of them is not wrapped in the
<?php if ( ! is_page( 35 ) ) : ?>
statement?November 16, 2017 at 2:26 am #425731Alan
hi again Leo,
yea ive been getting a bit bogged down with the little bit of code I’m trying to impliment.
ok i have it simplified now but still no joy . . .
<?php if ( ! is_page( 10 ) ) : ?> <div class="hook-slider3"> [huge_it_slider id="3"] </div> <?php endif; ?> <div class="hook-logos-text"> Payments accepted with </div> <div class="hook-logos"> <img src="http://-.biz/wp-content/uploads/2017/11/Bitcoin_logo.jpg"> <img src="http://-.biz/wp-content/uploads/2017/11/Byteball-logo.jpg"> <img src="http://-.biz/wp-content/uploads/2017/11/phore-logo.jpg"> <img src="http://-.biz/wp-content/uploads/2017/11/pivx-logo.jpg"> </div>
November 16, 2017 at 7:36 am #426002Leo
StaffCustomer Supportso you don’t want it on front page?
Try this instead:
<?php if ( ! is_front_page() ) : ?>
November 16, 2017 at 8:07 am #426033Alan
hi leo, no i want to exclude it from the contact page
?page_id=35
i have added the page number
<?php if ( ! is_page( 35 ) ) : ?> <div class="hook-slider3"> [huge_it_slider id="3"] </div> <?php endif; ?>
November 16, 2017 at 8:22 am #426041Leo
StaffCustomer SupportDid you check execute PHP?
November 16, 2017 at 8:47 am #426069Alan
O M G
apologies Leo,
clicking the little box to “execute PHP”
really does help in these matters.Apologies for the wild goose chase.
A
November 16, 2017 at 10:11 am #426166Leo
StaffCustomer SupportNo problem 🙂
Glad you figured out!
February 2, 2018 at 11:35 am #486687mor
Is it possible to exclude the same items from more than one page in the same snippet?
February 2, 2018 at 3:12 pm #486817Leo
StaffCustomer SupportYup of course. Check this: https://codex.wordpress.org/Conditional_Tags#A_Single_Post_Page
-
AuthorPosts
- You must be logged in to reply to this topic.