Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

Inspired by a post on this forum...


  #1  
Old Aug 20, 2012, 09:58 AM
Jumpy
 
4 posts · Aug 2012
Inspired by a post on this forum...

Hi.

I was inspired by a post on this forum, being able to show something different based on a certain page:

Code:
<?php if ( is_page('A_PAGE') ) { ?>
<!-- Something -->
<?php } ?>
However, i am trying to figure out to use the above on different pages, such as a Else case like

Code:
<?php if ( is_page('A_PAGE') ) { ?>
<!-- Something -->
<?php } ?>
<?php if ( is_page('ANOTHER_PAGE') ) { ?>
<!-- Something -->
<?php } ?>
But only then in one strict code, up to 8 pages. Is anyone here know what i mean and able to answer my question? Basicly in a wordpress layout i am trying to show different CSS headers on different pages, in one code. Thx!
  #2  
Old Aug 20, 2012, 11:47 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
You should use an IF/ELSE combination

if (x = a) {do something;}
elseif (x = 'b') {do something else;}
elseif (x = 'c') {do something else;}
else {do the default thing;}

you can find the exact syntax via google
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Aug 20, 2012, 12:30 PM
Jumpy
 
4 posts · Aug 2012
I'm not that expert with PHP, but i do understand something about it.

Do you happen to have a example code of what i posted above?
  #4  
Old Aug 21, 2012, 09:24 PM
Jumpy
 
4 posts · Aug 2012
Anyone?
  #5  
Old Aug 22, 2012, 03:45 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
did you try something? if so what is the code you tried?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #6  
Old Aug 22, 2012, 04:11 AM
Jumpy
 
4 posts · Aug 2012
All i have is the above code, from which was inspired on some topic here.

I dont know how exactly, but i'm trying to work with ELSE state, like if a page is not this then do that, i need this to show different headers each page. Does anyone know the ideal sollution?

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Atahualpla Theme Doesn't Allow the Post Publishing after instaling Simple Press Forum Ahmad Plugins & Atahualpa 1 Apr 5, 2012 06:14 PM
WP Forum + Atahualpa: User cannot see the forum Janine Plugins & Atahualpa 7 Jan 25, 2010 09:39 AM
Stop! Don't post in the 'HOW TO' forum if.... paulae Forum How-To 4 Oct 19, 2009 12:12 PM
[SOLVED] Cannot post request in donor forum ldsmedia Customization, Design, Programming... 12 Aug 4, 2009 12:34 AM


All times are GMT -6. The time now is 02:44 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.