Danke für eure Hilfe.
"the excerpt reloaded" war genau das was ich gesucht habe.
Bilder und Links automatisch im Kurztext auf der Hauptseite.
Beiträge von cooper
-
-
Ich habe in der Index.php the_content() mit the_excerpt() ersetzt.
Soweit funktioniert alles. Es werden aber keine Bilder und keine Links auf der Startseite dargestellt, nur die 120 ersten Zeichen.
Beim verfassen von Beiträgen kann ich im Feld "Optionale Kurzfassung" auch keine Bilder einfügen.
Die Funktion <more> ist mir bekannt aber hätte lieber wenn dies automatisch funktionierte.
PHP
Alles anzeigen<?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><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_excerpt('weiter...'); ?> </div> <p class="postmetadata">Kategorie <?php the_category(', ') ?> <strong>|</strong> <?php comments_popup_link('0 Kommentare »', '1 Kommentar »', '% Kommentare »'); ?> <?php edit_post_link('Bearbeiten','<strong>|</strong> ',''); ?> </p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Vorherige Einträge') ?></div> <div class="alignright"><?php previous_posts_link('Nächste Einträge »') ?></div> </div> <?php else : ?> <h2 class="center">Nicht gefunden</h2> <p class="center">Sorry, aber Du suchst gerade nach etwas, was hier nicht ist.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?> -
Wo genau?
Danke für deine schnelle Antwort.
Kannst du mir sagen wo genau und in welcher Datei ich das the_excerpt() einfügen muss. Wo liegt den das Hauptposting mit dem Feld. -
Hallo,
Ist es möglich pro Beitrag ein Bild in der optionalen Kurzfassung auf der Startseite anzeigen zu lassen.
Habe den Tag the_excerpt in der Index.php eingefügt. -
Danke
Hat geklappt.
Danke für deine super schnelle hilfe.
-
the_content() tag nivhtgefunden
Danke für die schelle Antwort.
Unter wp-content/themes/header.php
habe ich leider kein the_content() tag gefunden.Habe das WordPress Standard DE-Edition 1.5 by Michael Heilemann instaliert.
header.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /><title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archiv <?php } ?> <?php wp_title(); ?></title>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /><style type="text/css" media="screen">
/* To accomodate differing install paths of WordPress, images are referred only here,
and not in the wp-layout.css file. If you prefer to use only CSS for colors and what
not, then go right ahead and delete the following lines, and the image files. */
body { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgcolor.jpg"); }
<?php /* Checks to see whether it needs a sidebar or not */ if ((! $withcomments) && (! is_single())) { ?>
#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg.jpg") repeat-y top; border: none; }
<?php } else { // No sidebar ?>
#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
<?php } ?>
#header { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickheader.jpg") no-repeat bottom center; }
#footer { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickfooter.jpg") no-repeat bottom; border: none;}/* Because the template is slightly different, size-wise, with images, this needs to be set here
If you don't want to use the template's images, you can also delete the following two lines. */
#header { margin: 0 !important; margin: 0 0 0 1px; padding: 1px; height: 198px; width: 758px; }
#headerimg { margin: 7px 9px 0; height: 192px; width: 740px; }/* To ease the insertion of a personal header image, I have done it in such a way,
that you simply drop in an image called 'personalheader.jpg' into your /images/
directory. Dimensions should be at least 760px x 200px. Anything above that will
get cropped off of the image. */
/*
#headerimg { background: url('<?php bloginfo('stylesheet_directory'); ?>/images/personalheader.jpg') no-repeat top;}
*/
</style><?php wp_head(); ?>
</head>
<body>
<div id="page"><div id="header">
<div id="headerimg">
<h1><a href="<?php echo get_settings('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div class="description"><?php bloginfo('description'); ?></div>
</div>
</div>
<hr /> -
Guten Tag,
Wie kann ich es anstellen das auf der Haupt- Startseite pro Beitrag nur eine Zusammenfassung von 3-4 Sätzen erscheint und erst beim klicke auf den Titel eine neue Seite mit dem kompletten Bericht erscheint.
Danke für eure Hilfe.
blog.roboter-shop.ch