shaun1981
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Changing names of posts and pages in admin areaThanks
Forum: Fixing WordPress
In reply to: Trouble with a conditional statementExcellent thanks. It was the end of the first line I was getting wrong.
Forum: Fixing WordPress
In reply to: Is there a plugin for this or is it easy to do?Thanks
Forum: Fixing WordPress
In reply to: Is there a plugin for this or is it easy to do?Ok think i’ll forget the text boxes thing and just put together a little PDF file for them.
Thank you for pointing that out for me, i’ll take a look at the contributor level.
Forum: Fixing WordPress
In reply to: HTTP Error – Adding an image to a postAlso my wordpress site is on a subdomain if this has any bearing on things?
Forum: Fixing WordPress
In reply to: Can anyone help me with this? Static homepageOk i think i have resolved this using query_posts. Here’s the code for anyone interested
<?php /* Template Name: Homepage */ ?> <?php get_header(); ?> <?php $temp_query = $wp_query; ?> <div id="news"> <div id="featured"> <h1>Latest News</h1> <?php query_posts('showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> <?php the_excerpt(); ?> <?php endwhile; ?> </div> <div id="headlines"> <h2>News Headlines</h2> <?php query_posts('showposts=3&offset=1'); ?> <ul> <?php while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul> </div> <p class="clear"></p> </div> <div id="content"> <?php query_posts('page_id=5'); global $more; $more = 0; while (have_posts()) : the_post(); the_content('Read the full post »'); endwhile; ?> </div> <?php get_footer(); ?>Forum: Fixing WordPress
In reply to: Can anyone help me with this? Static homepageThanks. I have managed to get the dynamic content and static content displaying on the page now with just one problem. I want the dynamic “news” section at the top of the page above the static content but can’t get that to work.
Here’s my code now:
<?php /* Template Name: Homepage */ ?> <?php get_header(); ?> <div id="content"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><?php the_title(); ?></h2> <div class="entry"> <?php the_content('<p class="serif"><strong>Read the rest of this page »</strong></p>'); ?> <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?> </div> </div> <?php endwhile; endif; ?> </div> <?php $temp_query = $wp_query; ?> <div id="news"> <div id="featured"> <h1>Latest News</h1> <?php query_posts('showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> <?php the_excerpt(); ?> <?php endwhile; ?> </div> <div id="headlines"> <h2>News Headlines</h2> <?php query_posts('showposts=3&offset=1'); ?> <ul> <?php while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul> </div> <p class="clear"></p> </div> <?php get_footer(); ?>I tried re-arranging the code so that the news section was above but when i do that it loses the static content and just displays the full posts. Any ideas?
Forum: Fixing WordPress
In reply to: Conditional tags – little help neededI appear to have got it working by adding the following
<?php if( is_page(116) ) { $img = 'image1.gif'; $alt = 'image 1'; $link = 'link.html'; } else { $img = 'image2.gif'; $alt = 'image 2'; $link = 'link2.html'; } ?> <a href="<?php echo $link; ?>"><img src="<?php echo $img; ?>" alt="<?php echo $alt; ?>" /></a>