Autor |
Nachricht |
flavio
Threadersteller
Dabei seit: 14.04.2003
Ort: MUC
Alter: 44
Geschlecht:
|
Verfasst Sa 09.01.2010 20:46
Titel WP Limit Post keine Bilder auf Index |
|
|
Ahoi,
ich fummel gerade an einem Wordpress Theme herum dass ein Limit Post Plugin verwendet.
Leider verhindert das Plugin die Darstellung von Bildern auf der Index Seite.
Kann mir einer sagen ob und was ich hier umändern muss um Bilder anzeigen zu können?
Code: | <?php
/*
Download URL: http://labitacora.net/comunBlog/limit-post.phps
Make:
In file index.php
replace the_content()
with the_content_limit(1000, "more")
*/
function the_content_limit($max_char, $more_link_text = 'Read→', $stripteaser = 0, $more_file = '') {
$content = get_the_content($more_link_text, $stripteaser, $more_file);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
$content = strip_tags($content,'');
if (strlen($_GET['p']) > 0) {
echo "<p>";
echo $content;
echo " <a href='";
the_permalink();
echo "'>"."Read More →</a>";
echo "</p>";
}
else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {
$content = substr($content, 0, $espacio);
$content = $content;
echo "<p>";
echo $content;
echo "...";
echo " <a href='";
the_permalink();
echo "'>".$more_link_text."</a>";
echo "</p>";
}
else {
echo "<p>";
echo $content;
echo " <a href='";
the_permalink();
echo "'>"."Read More →</a>";
echo "</p>";
}
}
?>
|
in der index.php steht nur das (Auszug)
Zitat: | <div class="cover">
<div class="entry">
<?php if(function_exists('the_content_limit')) { ?>
<?php the_content_limit(5000); ?>
<?php } else { ?>
<p> Activate the limitpost plugin to see the post contents ! </p>
<?php } ?>
<div class="clear"></div>
</div>
</div> |
|
|
|
|
|
Smooth-Graphics
Dabei seit: 22.05.2006
Ort: -
Alter: -
Geschlecht:
|
Verfasst Sa 09.01.2010 21:21
Titel
|
|
|
Fest steht wohl, dass hier das Plugin nicht die Bilder mit aus dem Wordpresspost herausliest:
Code: |
$content = get_the_content($more_link_text, $stripteaser, $more_file);
$content = apply_filters('the_content', $content);
|
Kommentier doch mal testweise die o.g. 2. Zeile aus mit einem # vorne zu Beginn der Zeile.
|
|
|
|
|
Anzeige
|
|
|
flavio
Threadersteller
Dabei seit: 14.04.2003
Ort: MUC
Alter: 44
Geschlecht:
|
Verfasst Sa 09.01.2010 21:50
Titel
|
|
|
Dann ist der ohnehin gekürzte blogeintrag komplett weg.
Zuletzt bearbeitet von flavio am Sa 09.01.2010 21:50, insgesamt 1-mal bearbeitet
|
|
|
|
|
flavio
Threadersteller
Dabei seit: 14.04.2003
Ort: MUC
Alter: 44
Geschlecht:
|
Verfasst Sa 09.01.2010 22:26
Titel
|
|
|
ich hab jetzt mal vom standard theme den entsprechenden eintrag einkopiert.
wenn allerdings nur ein kleines bild auftaucht, wird die klasse "date" nicht unter das bild gestellt, sondern daneben.
woarn könnte das liegen?
Zitat: | <div class="cover">
<div class="entry">
<?php the_content(__('Read the rest of this entry »', 'kubrick')); ?>
</div>
</div>
<div class="date"> <span class="clock"> On <?php the_time('F - j - Y'); ?></span> <span class="category"><?php the_category(' '); ?> </span></div>
</div>
<?php endwhile; ?>
<div id="navigation">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
</div>
<?php else : ?>
<h1 class="title">Not Found</h1>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php endif; ?>
</div> |
|
|
|
|
|
m
Moderator
Dabei seit: 18.11.2004
Ort: -
Alter: -
Geschlecht:
|
Verfasst Sa 09.01.2010 23:45
Titel
|
|
|
Um dir helfen zu können müßte man jetzt auch den zugehörigen CSS Part kennen.
Um welches Theme handelt es sich? Und welche Änderung möchtest du vornehmen?
|
|
|
|
|
flavio
Threadersteller
Dabei seit: 14.04.2003
Ort: MUC
Alter: 44
Geschlecht:
|
Verfasst So 10.01.2010 02:45
Titel
|
|
|
das ist das zinfolio theme
http://topwpthemes.com/zinfolio-wordpress-theme/
Zitat: | .entry {
margin:0 0;
padding: 0px 5px 5px 0px;
}
.entry a:link,
.entry a:visited {
color: #f00000;
background-color: transparent;
}
.entry a:hover {
color:#f07100;
background-color: transparent;
text-decoration: none;
}
.entry p{
margin:5px 5px;
padding:0px 0px;
font-family: Tahoma,Georgia, Arial,century gothic,verdana, sans-serif;
font-size:13px;
}
.entry table{
margin:5px 5px;
padding:0px 0px;
/* Autor, Veröffentlicht, Kategorie*/
span.author{
color:#828687;
padding:2px 5px 2px 20px;
background:url(images/user.png) no-repeat;
margin-left:0px;
}
.clock{
color:#555859;
padding:2px 5px 2px 20px;
background:url(images/clock.png) no-repeat;
margin-left:0px;
|
|
|
|
|
|
m
Moderator
Dabei seit: 18.11.2004
Ort: -
Alter: -
Geschlecht:
|
Verfasst So 10.01.2010 12:45
Titel
|
|
|
Und was möchtest du verändern?
quick n dirty:
Code: | .entry {
margin:0 0;
padding: 0px 5px 5px 0px;
overflow: hidden;
} |
Zuletzt bearbeitet von m am So 10.01.2010 12:50, insgesamt 1-mal bearbeitet
|
|
|
|
|
|
|
|
Ähnliche Themen |
Schmutziger Post
Wordpress Theme mit abgesetztem Post
Eine statische index.html vor Wordpress
Bilder taggen für Webgalerie
PHP Zitate und Bilder Software
Bilder Webshop für mehrere Fotografen
|
|