Zurück   WordPress Deutschland Forum > Support > Design

Antwort
 
Themen-Optionen Ansicht
Alt 14.03.2007, 14:40   #1 (permalink)
PostRank: 0
 
Registriert seit: 01.09.2005
Beiträge: 19
nur eine kategorie als "mainpage"?!

hallo leutz.
kann mir jemand helfen?
ich hätte gern nur eine kategorie als erste angezeigte seite auf meinem blogg.
wie kann ich das realisieren?
redman ist offline   Mit Zitat antworten
Alt 14.03.2007, 16:32   #2 (permalink)
WPD-Team
 
Benutzerbild von Monika
 
Registriert seit: 04.06.2005
Ort: INET
Beiträge: 6.870
Hi also du möchtest die Beiträge einer Kat als erster auf der Startseite und sonst keine anderen
sagen wir diese Kategorie hat die ID 5

Code:
<?php query_posts('cat=5');
if(have_posts()) : while(have_posts()) : the_post() ?>

dann das ganze andere ...
bis zu 

<php endwhile; endif; ?>
wenn du damit was anfangen kannst gut, wenn nicht musst du die index.php Deines Themes hier posten oder das Template der Seite, die Du als Startseite definiert hast

lg
Monika ist offline   Mit Zitat antworten
Alt 15.03.2007, 09:08   #3 (permalink)
PostRank: 0
 
Registriert seit: 01.09.2005
Beiträge: 19
ersteinmal vielen dank monika.
so geht es aber leider nicht ;o(
also um ganz ehrlich zu sein, weiß ich nicht mal wie man eine seite als startseite definiert. aber hier erstmal meine index.php ...

PHP-Code:
<?php get_header(); ?>
<div id="content_main">
<table border="0" cellpadding="0" cellspacing="0" width="519">
  <tbody><tr><td>
<table class="blog" cellpadding="0" cellspacing="0">
<tbody><tr><td valign="top">
<div>
<table class="contentpaneopen">
<tbody>
<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
<tr><td class="contentheading" width="100%">        
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>    </td></tr>
<tr><td> <span class="small"><?php the_time('F jS, Y'?> under <?php the_category(', '?>.  [ <a href="<?php comments_link(); ?>"><strong>Comments:</strong> <?php comments_number('none','1','%'); ?></a> ]
<?php edit_post_link('Edit',' [ ',' ] '); ?></span></td></tr>
<tr> <td width="100%"> <p> 
<?php the_content('Read more &raquo;'); ?></p>
<hr size="1" color="#666666">
</td> </tr>
<?php endwhile; ?>
<tr> <td> <p><?php next_posts_link('&laquo; Previous entries'?>&nbsp;<?php previous_posts_link('Next entries &raquo;'?> </p> </td> </tr>
<?php else : ?>
<tr> <td>
<h2>Not found!</h2>
<p>Could not find the requested page. Use the navigation menu to find your target, or use the search box below:</p>
<?php include (TEMPLATEPATH "/searchform.php"); ?>
</td></tr>
<?php endif; ?>
</tbody></table>
</div>
</td></tr></tbody></table>
</td></tr></tbody></table> </div>
<!-- end main body -->
</div></div>
<?php get_sidebar(); ?>
<?php get_footer
(); ?>
wie hasst du das mit dem code gemacht?
zu meiner entschuldigung. ich habe mich lange nicht mit wordpress beschäftigt, hatte eine lange zeit eine gut laufende wp 1.5 version bis mein serveradmin umgezogen ist und gleich 2.0 installiert hatte.
dann musste ich notgedrungen und schnell umbasteln.
habe dazu das template tiju-13 genommen.
jetzt bin ich gerade dabei mich mal wieder einzufuchsen.
danke noch mal und bis bald ...

Geändert von jottlieb (19.03.2007 um 19:46 Uhr).
redman ist offline   Mit Zitat antworten
Alt 15.03.2007, 10:52   #4 (permalink)
WPD-Team
 
Benutzerbild von Monika
 
Registriert seit: 04.06.2005
Ort: INET
Beiträge: 6.870
Code:
 
 
<?php get_header(); ?>
<div id="content_main">
<table border="0" cellpadding="0" cellspacing="0" width="519">
<tbody><tr><td>
<table class="blog" cellpadding="0" cellspacing="0">
<tbody><tr><td valign="top">
<div>
<table class="contentpaneopen">
<tbody>
<?php if (have_posts()) : ?>
 
<?php query_posts('cat=5');

 
 
 
<?php while (have_posts()) : the_post(); ?>
<tr><td class="contentheading" width="100%">        
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>    </td></tr>
<tr><td> <span class="small"><?php the_time('F jS, Y') ?> under <?php the_category(', ') ?>. [ <a href="<?php comments_link(); ?>"><strong>Comments:</strong> <?php comments_number('none','1','%'); ?></a> ]
<?php edit_post_link('Edit',' [ ',' ] '); ?></span></td></tr>
<tr> <td width="100%"> <p> 
<?php the_content('Read more &raquo;'); ?></p>
<hr size="1" color="#666666">
</td> </tr>
 
 
 
<php endwhile; endif; ?>
 
 
 
 
<tr> <td> <p><?php next_posts_link('&laquo; Previous entries') ?>&nbsp;<?php previous_posts_link('Next entries &raquo;') ?> </p> </td> </tr>
<?php else : ?>
<tr> <td>
<h2>Not found!</h2>
<p>Could not find the requested page. Use the navigation menu to find your target, or use the search box below:</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
</td></tr>
<?php endif; ?>
</tbody></table>
</div>
</td></tr></tbody></table>
</td></tr></tbody></table> </div>
<!-- end main body -->
</div></div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>


könnte so gehen
Monika ist offline   Mit Zitat antworten
Alt 15.03.2007, 17:38   #5 (permalink)
PostRank: 0
 
Registriert seit: 01.09.2005
Beiträge: 19
hallo monika
klappt leider auch nicht wenn ich ...
<?php if (have_posts()) : ?>
<?php query_posts('cat=5');
<?php while (have_posts()) : the_post(); ?>

gegen

<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>

(und mehr ist es ja nicht oder?)

dann bekomme ich fogenden fehler ...

Parse error: syntax error, unexpected '<' in /home/396/domains/helmke.org/html/wp-content/themes/tiju-13/index.php on line 35

gleich beim aufruf der seite ;o(

hmmmzzzzzzz ...
redman ist offline   Mit Zitat antworten
Alt 19.03.2007, 13:29   #6 (permalink)
PostRank: 0
 
Registriert seit: 01.09.2005
Beiträge: 19
weiß noch wer was?
redman ist offline   Mit Zitat antworten
Alt 19.03.2007, 19:47   #7 (permalink)
WPD-Team
 
Benutzerbild von jottlieb
 
Registriert seit: 20.08.2005
Ort: Berlin
Beiträge: 10.916
PHP-Code:
<?php
 $posts 
get_posts('numberposts=3&category=1');
 foreach(
$posts as $post) :
 
setup_postdata($post);
 
?>
<div class="post" id="post-<?php the_ID(); ?>">
                <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
                <small><?php the_time('j. F Y'?> <!-- by <?php the_author() ?> --></small>

                <div class="entry">
                    <?php the_content('<p class="serif"><strong>Weiterlesen &raquo;</strong></p>'); ?>

                <?php link_pages('<p><strong>Seiten:</strong> ''</p>''number'); ?>
                </div>

<p class="postmetadata">Abgelegt unter <?php the_category(', '?> <strong>|</strong> <?php edit_post_link('Bearbeiten','','<strong>|</strong>'); ?> Autor: <?php the_author_posts_link(); ?></p>

            </div>
 <?php endforeach; ?>
Keine Ahnung ob der Schnipsel so reicht. Hier meine ganze home.php:
PHP-Code:
<?php get_header(); ?>

    <div id="content" class="narrowcolumn">

    <?php if (have_posts()) : ?>

        <?php while (have_posts()) : the_post(); ?>

            <div class="post" id="post-<?php the_ID(); ?>">
<h2>Willkommen</h2>
                <div class="entry">

                    <?php the_content('<p class="serif"><strong>Weiterlesen &raquo;</strong></p>'); ?>

                <?php link_pages('<p><strong>Seiten:</strong> ''</p>''number'); ?>
                </div>
<br></br>
<p class="trenner alt">Aktuelles</p>

<?php
 $posts 
get_posts('numberposts=3&category=1');
 foreach(
$posts as $post) :
 
setup_postdata($post);
 
?>
<div class="post" id="post-<?php the_ID(); ?>">
                <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
                <small><?php the_time('j. F Y'?> <!-- by <?php the_author() ?> --></small>

                <div class="entry">
                    <?php the_content('<p class="serif"><strong>Weiterlesen &raquo;</strong></p>'); ?>

                <?php link_pages('<p><strong>Seiten:</strong> ''</p>''number'); ?>
                </div>

<p class="postmetadata">Abgelegt unter <?php the_category(', '?> <strong>|</strong> <?php edit_post_link('Bearbeiten','','<strong>|</strong>'); ?> Autor: <?php the_author_posts_link(); ?></p>

            </div>
 <?php endforeach; ?>



            </div>

        <?php endwhile; ?>


    <?php else : ?>

        <!--<h2 class="center">Nichts gefunden</h2>
        <p class="center">Du hast nach etwas gesucht, das es hier nicht gibt.</p>-->
        <?php include (TEMPLATEPATH "/searchform.php"); ?>

    <?php endif; ?>


    </div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>
__________________
Wordpress FAQ (Häufig gestellte Fragen) | Themepool
"Eine gut gestellte Frage ist schon halb beantwortet."
jottlieb ist gerade online   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist aus.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:41 Uhr.


Powered by vBulletin® Version 3.7.4 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 | Impressum | Ein Inpsyde.com Projekt