---
title: "Wordpressposterna visas inte på indexsidan"
type: "forum-thread"
url: "https://www.webforum.nu/amne/webbutveckling/176184-wordpressposterna-visas-inte-på-indexsidan"
topic: "Webbutveckling"
topic_url: "https://www.webforum.nu/amne/webbutveckling"
author: "magnusfeldth"
published: "2009-01-04T22:27:01.000Z"
updated: "2009-01-05T15:52:33.000Z"
replies: 4
views: 562
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/webbutveckling/176184-wordpressposterna-visas-inte-på-indexsidan"
---

# Wordpressposterna visas inte på indexsidan

## #1 — magnusfeldth, 2009-01-04T22:27Z

Jag har nyligen skapat en blogg med wordpress och använder ett nytt snyggt tema, grid-a-licous, men problemet är att inga poster som jag skriver kommer på indexsidan...

så här ser php-koden ut för index-sidan - behöver ni nåt mer?

```php
<?php get_header(); ?>

<div class="navigation_group">
	<?php next_posts_link('<div class="eachpost "><div>&mdash;Older</div></div>') ?>
	<?php previous_posts_link('<div class="eachpost "><div>Newer&mdash;</div></div>') ?>
</div>

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
	<?php 
			
			$upload_path = get_option( 'upload_path' );
			$upload_path = trim($upload_path);
			
			$img_full_url = post_image();
		
			if ($img_full_url != "") {	
				
			$temp = substr(strrchr($upload_path, "/"), 1);
			
			list($url, $filename) = explode($temp, $img_full_url);
			
			$img_url = $upload_path . "/" . $filename;
			
			$imagesize = getimagesize($img_url);
			list($width, $height, $type, $attr) = getimagesize($img_url);
			$theClass = "eachpost ";
			if ( $width < "440" ) { $new_width = "200"; $theClass = "eachpost "; } 
				else if ( $width < "660" ) { $new_width = "430"; $theClass = "eachpost twocols"; }
					else { $new_width = "660"; $theClass = "eachpost threecols"; }
			
			$new_height = ($height*$new_width)/$width;
			echo '<div class="'.$theClass.'">
					<div>'; ?>
		
			<?php  if ( $img_full_url != "" ) {
					echo '<img src="' . $img_full_url . '" width="' . $new_width . '" height="' . $new_height . '" /><br /><br />'; } 
					
			} else { 
				echo '<div class="eachpost ">
						<div>'; } ?>

			<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>

			<div class="contentIndex"><?php 

			ob_start();
   			the_content('Read the full post',true);
  			$postOutput = preg_replace('/<img[^>]+./','', ob_get_contents());
   			$postOutput = str_replace('<div class="eachpost "><div></div></div>','',$postOutput);
   			$postOutput = str_replace('<div class="eachpost twocols"><div></div></div>','',$postOutput);
  			$postOutput = str_replace('<div class="eachpost threecols"><div></div></div>','',$postOutput);
	   
   			ob_end_clean();
   			echo $postOutput; ?>
   			
   			</div>

			<small>
			
			<?
			
			
			?>
			
			Published on <?php the_time('M d, Y'); ?> <?php _e("at"); ?> <?php the_time('g:i a'); ?>.<br />
			Filled under: <?php the_category(',') ?> <?php the_tags('Tags:', ', ', ''); ?> | 
			<a href="<?php comments_link(); ?>"><?php comments_number('No Comments','1 Comment','% Comments'); ?></a></small>

  	 </div>
  </div> 
    
    <?php if ( comments_open() ) comments_template(); ?>

<?php endwhile; else: ?>
<div class="warning">
	<p>Sorry, but you are looking for something that isn't here.</p>
</div>
<?php endif; ?>

<div class="navigation_group">
	<?php next_posts_link('<div class="eachpost "><div>&mdash;Older</div></div>') ?>
	<?php previous_posts_link('<div class="eachpost "><div>Newer&mdash;</div></div>') ?>
</div>

    <?php get_footer(); ?>
```

 

kan inget om php, kodat i asp förut och kan det ganska bra...

Permalänk: https://www.webforum.nu/p/176184

## #2 — legis, 2009-01-04T22:44Z

Har du följt dess installationsinstruktioner?

"upload the theme folder “grid-a-licious” to your Wordpress theme folder. Upload the plugin “post-image.php” to your Wordpress plugin folder (and active it). Replace “media.php” within your Wordpress installation –\> wp-includes folder with the one that came with this package."

Permalänk: https://www.webforum.nu/p/2161378

## #3 — magnusfeldth, 2009-01-04T23:05Z

ja, allt det är gjort... fast jag vet inte vad de menar med "activate it" angående post-image-filen.

om ni kollar på sidan (<https://www.twocakesandagun.se>) så kan ni se hur det ser ut... rss får upp posterna, men inte indexsidan... hm...

Permalänk: https://www.webforum.nu/p/2161381

## #4 — legis, 2009-01-04T23:45Z

Aktivera det gör du under plugins i Wordpress. Allt som laddas upp till katalogen wp-content/plugins måste också aktiveras inifrån Wordpress.

Permalänk: https://www.webforum.nu/p/2161384

## #5 — magnusfeldth, 2009-01-05T15:52Z

tack legis, nu visas posterna även på indexsidan!

(men inga bilder visas än, damnit! vad kan det bero på?)

Permalänk: https://www.webforum.nu/p/2161456

---

Tråden på webben: https://www.webforum.nu/amne/webbutveckling/176184-wordpressposterna-visas-inte-på-indexsidan
