[PHP] PHP code problem with pages

2012-01-21 Thread Carlos Sura
Hello Mates,

Maybe my subject line is not descriptive as I wish, but I just did not know
how to put on it.

I have the following problem, I'm using jQuery to make a slide effect
(horizontal), everything seems to be working find, but I have to add a mask
with a white color background, I did this by CSS, now I have 6 pages in
total, this is managed by wp anyway, it shows the white bakground mask in
every page, and I want it to show in every page but not the home page;
since I'm using a slider effect and a container, it became very difficult
to me, maybe any of you can explain me a way to a easy fix, I will show you
the lines of code:

div id=wrapper
div id=mask
?php $pages = list_all_pages(); ?

?php
//Get first and last page ID
$cnt = 0;
foreach($pages as $page) {
$post_keys = get_post_custom_values('section_id', $page-ID);
$post_key[$cnt] = $post_keys[0];
$cnt++;
}
?

?php
$cnt = 0;
foreach($pages as $page) {
$post_keys = get_post_custom_values('section_id', $page-ID);
?
  div class=item ?php if(($jxfs_transition == 'horizontal_vertical' 
$cnt%2 == 0) || ($jxfs_transition == 'horizontal')) { echo 'fl';} ?
id=?php echo $post_keys[0]; ?
div class=content
?php
$page_content = get_page($page-ID);
?
  ul class=container //This is the container with the white
background.
li class='grid_820'
?php
echo do_shortcode($page_content-post_content);
?
/li


As you can see, I'm using this for all pages, I was trying to use another
template-code to tell wordpress that home page uses another page as home,
but it does not work for some reason. Anyway, help will be appreciated.

-- 
Carlos Sura.-
www.carlossura.com


Re: [PHP] PHP code problem with pages

2012-01-21 Thread Daniel Brown
On Sat, Jan 21, 2012 at 20:07, Carlos Sura carlos.su...@googlemail.com wrote:
 Hello Mates,

 Maybe my subject line is not descriptive as I wish, but I just did not know
 how to put on it.

 I have the following problem, I'm using jQuery to make a slide effect
 (horizontal), everything seems to be working find, but I have to add a mask
 with a white color background, I did this by CSS, now I have 6 pages in
 total, this is managed by wp anyway, it shows the white bakground mask in
 every page, and I want it to show in every page but not the home page;
 since I'm using a slider effect and a container, it became very difficult
 to me, maybe any of you can explain me a way to a easy fix, I will show you
 the lines of code:

This is probably better answered via a WordPress support venue,
but you can try this:

if ($_SERVER['PHP_SELF'] == 'the name of your index file') {
// Load alternate styling here
} else {
// Do your primary styling
}



 div id=wrapper
 div id=mask
 ?php $pages = list_all_pages(); ?

 ?php
 //Get first and last page ID
 $cnt = 0;
 foreach($pages as $page) {
 $post_keys = get_post_custom_values('section_id', $page-ID);
 $post_key[$cnt] = $post_keys[0];
 $cnt++;
 }
 ?

 ?php
 $cnt = 0;
 foreach($pages as $page) {
 $post_keys = get_post_custom_values('section_id', $page-ID);
 ?
  div class=item ?php if(($jxfs_transition == 'horizontal_vertical' 
 $cnt%2 == 0) || ($jxfs_transition == 'horizontal')) { echo 'fl';} ?
 id=?php echo $post_keys[0]; ?
 div class=content
 ?php
 $page_content = get_page($page-ID);
 ?
  ul class=container         //This is the container with the white
 background.
 li class='grid_820'
 ?php
 echo do_shortcode($page_content-post_content);
 ?
 /li


 As you can see, I'm using this for all pages, I was trying to use another
 template-code to tell wordpress that home page uses another page as home,
 but it does not work for some reason. Anyway, help will be appreciated.

 --
 Carlos Sura.-
 www.carlossura.com



-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php