Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Condition to home page (index)
#4
alvares Wrote:
Carlos Wrote:
Code:
<?php
if (return_page_slug()=='index') {
// your code here ...
}
?>


Ok. Thanks Carlos.

I put the proposed code for you but could not, within the content of the condition is not rendering.

my code looks like this:
Code:
<?php
    if (return_page_slug()=='index') {
        <div class="coda-slider preload" id="coda-slider-1">

             <?php include("index.php");?>

          <?php include("index.php?id=page2");?>

          <?php include("index.php?id=page3");?>
    }
    else {
      get_page_content();
    }
    ?>

Any other tips to make it work?


try like this :

Code:
<?php
    if (return_page_slug()=='index') {
        echo '<div class="coda-slider preload" id="coda-slider-1">';

          include("index.php");

          include("index.php?id=page2");

          include("index.php?id=page3");
    }
    else {
      get_page_content();
    }
    ?>
Reply


Messages In This Thread
Condition to home page (index) - by alvares - 2011-12-19, 02:43:19
Condition to home page (index) - by Carlos - 2011-12-19, 02:58:29
Condition to home page (index) - by alvares - 2011-12-19, 03:17:28
Condition to home page (index) - by didou038 - 2011-12-19, 03:23:00
Condition to home page (index) - by alvares - 2011-12-19, 03:31:23
Condition to home page (index) - by Carlos - 2011-12-19, 03:56:49



Users browsing this thread: 1 Guest(s)