tom-kroscavage
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Minimal index.php; Is the code solid?Dude! I like it.
Forum: Fixing WordPress
In reply to: Minimal index.php; Is the code solid?Thanks again alchmyth that helps. Here it is in the paste bin
index.phpSo if its a page this
<?php if (!is_page()) { ?>
jumps to this curly bracket?<?php } ?>
Forum: Fixing WordPress
In reply to: Minimal index.php; Is the code solid?Thanks alchymyth it works perfect after I fixed my comments. Here it is
Pages don’t jump out of the loop where I have them marked, do they?
Forum: Fixing WordPress
In reply to: Minimal index.php; Is the code solid?Sure Sharolyn start saving your money it aint gonna be cheap. Here’s the code. I guess I’m the php expert around here.
<?php get_header(); ?>// Call the header.php <?php if (is_single() || is_category() || is_archive()) {get_sidebar();} ?>// Call the sidebar if its not a page <div id="content"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>// The print post loop <?php if (!is_page()) { ?>// Pages jump out of the loop here <h2> <?php if( !is_single() AND !is_page() ) { ?> <a href="<?php the_permalink() ?>" > <?php } the_title(); if( !is_single() AND !is_page() ) { ?> <?php } ?></h2>// List post title links <?php } ?><?php if(is_category() || is_archive()) { the_excerpt(); } else { the_content(); } ?>// List the excerpts or full content for posts <?php endwhile; ?>// end of loop <?php posts_nav_link(' - ','« Prev','Next »') ?> // Prev Next post page links <?php if (is_single()) {comments_template();} ?> // Call comments.php if it is a post <?php else : ?>Nothing Here<?php endif; ?> // bad url </div><--End content div--> <?php get_footer(); ?>// Call the footer.php
Forum: Fixing WordPress
In reply to: Minimal index.php; Is the code solid?[Moronic expletive deleted]
Forum: Fixing WordPress
In reply to: Minimal index.php; Is the code solid?will this work?
Forum: Fixing WordPress
In reply to: Minimal index.php; Is the code solid?I made a few changes is it safe? Do I need more “end if”s?
<?php get_header(); ?> <?php if (is_single() || is_category() || is_archive()) {get_sidebar();} ?> <div id="content"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if (!is_page()) { ?> <h2><?php if( !is_single() AND !is_page() ) { ?> <a href="<?php the_permalink() ?>" ><?php } the_title(); if( !is_single() AND !is_page() ) { ?></a> <?php } ?></h2> <?php } ?><?php if(is_category() || is_archive()) { the_excerpt(); } else { the_content(); } ?><?php endwhile; ?> <?php posts_nav_link(' - ','? Prev','Next ?') ?> <?php if (is_single()) {comments_template();} ?> <?php else : ?>Nothing Here<?php endif; ?> </div> <?php get_footer(); ?>
Forum: Fixing WordPress
In reply to: Minimal index.php; Is the code solid?Is minimal faster?
Forum: Fixing WordPress
In reply to: How do I add a calculator to my posts?Here is my code in a post
<?php if($submit) { if($operator == '*') { echo $numa * $numb; } elseif($operator == '/') { echo $numa / $numb; } elseif($operator == '+') { echo $numa + $numb; } elseif($operator == '-') { echo $numa - $numb; } } else { ?> <form method="POST" action="<?php $_SERVER['PHP_SELF']; ?>"> <input type="text" name="numa" size="10"> <input type="text" name="operator" size="2"> <input type="text" name="numb" size="10"> <input type="submit" value="Calculate" name="submit"> </form> <?php } ?>
Forum: Fixing WordPress
In reply to: How do I add a calculator to my posts?Every time I paste a calculator from the internet the form works then when I press the calculate button the browser navigates back to my home page.
Forum: Themes and Templates
In reply to: get_sidebar only in postsIs this better?
<?php if (is_single()) {get_sidebar();} ?>
Forum: Themes and Templates
In reply to: Suckerfish Menu wp_list_pages ProblemsAnyone know how to fix this?
Forum: Themes and Templates
In reply to: Firefox Thinks My Site Is Written in DutchLooks like it is just my computer
Forum: Themes and Templates
In reply to: add a page to my themeThanks
Forum: Fixing WordPress
In reply to: I need help validatingHow can I post the code?