![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
So Fucking Banned
Industry Role:
Join Date: Jul 2016
Posts: 4,613
|
Simple <php> question / Wordpress
Pretty sure this is simple to do but sent a message to the plugin support and they completely ignored my question and replaced it with their own made up version.
Basically I have a slider plugin (Slider WD) and I was given some PHP code: Code:
<?php wd_slider(1); ?> How would I do this please? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Aug 2005
Location: YUROP
Posts: 8,606
|
Looks like you need is_page().. havent tested this, found at stackoverflow:
Code:
<?php if(is_page( 5 ): ?> <p>This is some text</p> <?php endif; ?>
__________________
![]() Anal Webcams | Kinky Trans Cams Live | Hotwife XXX Tube | Get your Proxies here |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
So Fucking Banned
Industry Role:
Join Date: Jul 2016
Posts: 4,613
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jan 2005
Location: Stockton
Posts: 4,365
|
Can't you just copy the pages template and rename it and upload it to the same template folder then select it in your edit pages post on the right side under page attributes select template.
__________________
ICQ:268731675 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
So Fucking Banned
Industry Role:
Join Date: Jul 2016
Posts: 4,613
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
frc
Industry Role:
Join Date: Jul 2003
Location: Bitcoin wallet
Posts: 4,663
|
Then that file will become the template custom for that url / page.
__________________
Crazy fast VPS for $10 a month. Try with $20 free credit |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: Dec 2004
Location: Denver
Posts: 6,559
|
So duplicate (potentially) hundreds of lines of PHP into a new template file to write one line of custom code for the page? Smaaart
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Nov 2001
Posts: 1,662
|
Quote:
https://developer.wordpress.org/refe...tions/is_page/ |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Industry Role:
Join Date: Dec 2012
Location: Scandinavia
Posts: 279
|
And if you get an error now, I think there must be TWO parentheses before the first colon. Looks like you are not a coder, just trying to help.
![]() Code:
<?php if(is_page( 5 )): ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Too lazy to wipe my ass
Industry Role:
Join Date: Aug 2002
Location: A Public Bathroom
Posts: 38,614
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |