Displaying Something on Certain Pages
-
On my site, https://www.thecaninedirectory.com, I want to place something that is on the homepage, on other pages on the site also.
If you look on the homepage, you can see the yellow “cap” (cap.php), which has the code:
<div class="intro"> <h3> Welcome </h3> <p> <?php $wel = get_option('spl_welcome'); echo stripslashes($wel); ?></p> </div> <div class="logtab"> <?php global $user_ID, $user_identity, $user_level ?> <?php if ( !$user_ID ) : ?> <h2>User Login</h2> <ul> <li> <form action="<?php bloginfo('url') ?>/wp-login.php" method="post"> <div class="form-item"> <label> USERNAME</label><br /> <input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="22" /> </div> <div class="form-item"> <label> PASSWORD</label><br /> <input type="password" name="pwd" id="pwd" size="22" /> </div> <input type="submit" name="submit" value="" class="logsub" /> <label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label> <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/> </form> </li> <li><a href="<?php bloginfo('url') ?>/wp-register.php">Create new account</a> — <a href="<?php bloginfo('url') ?>/wp-login.php?action=lostpassword">Forgot your password?</a></li> </ul> <?php else : ?> <h2>Admin panel</h2> <ul class="board"> <li>Welcome <strong><?php echo $user_identity ?></strong>. </li> <li><a href="<?php bloginfo('url') ?>/wp-admin/">Go to dashboard</a></li> <?php if ( $user_level >= 1 ) : ?> <li><a href="<?php bloginfo('url') ?>/wp-admin/post-new.php">Make new post</a></li> <li><a href="<?php bloginfo('url') ?>/wp-admin/page-new.php">Make new page</a></li> <?php endif // $user_level >= 1 ?> <li><a href="<?php bloginfo('url') ?>/wp-admin/profile.php">View profile</a></li> <li><a href="<?php bloginfo('url') ?>/wp-login.php?action=logout&redirect_to=<?php echo urlencode($_SERVER['REQUEST_URI']) ?>">Logout</a></li> </ul> <?php endif; ?> </div>
So how can I get that code to display on other pages that I choose throughout the site?
Thanks!
-Luke
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Displaying Something on Certain Pages’ is closed to new replies.