WordPress

Witaj Gościu ( Zaloguj | Rejestruj )

Każdy temat założony w ewidentnie złym dziale będzie usuwany! Proszę czytać opisy działów i regulamin!

> Uwaga!

Jeśli opisujesz problem ze skórką - podaj link do downloadu - nie każdy ma tą skórkę co Ty ;)

 
Reply to this topicStart new topic
> Wyświetlanie newsów
malyel
post 20.2.2008 - 23:26
Post #1


aktywność:
**

Grupa: +Bloger
Postów: 24

Nr: 2 574



Czy mógłby mi ktoś powiedzieć, jak mam wyedytować kod swojej skórki, by newsy wyświetlały się tak jak na:
http://www.umc.pl lub http://www.poznanskirap.com/. Chodzi mi głownie o obrazek i układ daty obok tytułu. Treść newsa o ile dobrze wiem mogę skrócać poleceniem "<---more--->".

Kod mojego index.php:
CODE
<?php get_header(); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="article" id="post-<?php the_ID(); ?>">
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Przejdź do: <?php the_title(); ?>">
<?php the_title(); ?>
</a></h1>
<h2><center><?php the_time('l, j F Y, G:i') ?><?php wp_link_pages(); ?>
<?php comments_popup_link(__('Komentarze (0)'), __('Komentarze (1)'), __('Komentarze (%)'), 'link-comentariu', __('Comments off')); ?></center>
</h2>
<?php the_content('<b>Dalej!</b>'); ?>
</div>
<div class="line"></div>
<?php endwhile; ?>
<div id="navigation">
<div class="alignleft">
<?php next_posts_link('Starsze newsy') ?>
</div>
<div class="alignright">
<?php previous_posts_link('Nowsze newsy') ?>
</div>
</div>
<?php else : ?>
<h2>Not found!</h2>
<p><span class="highlight">Sorry, but you are looking for something that isn't
here!</span></p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?></div>
<?php get_footer(); ?>
Go to the top of the page
 
+Quote Post
Kasia79
post 23.2.2008 - 10:16
Post #2


aktywność:
*******

Grupa: Redakcja
Postów: 868

Nr: 2 641



Posty skracamy poleceniem
KOD
<!--more-->

Taki wygląd, jak na wskazanych stronach, to przede wszystkim zabawa z style.css. W index.php trzeba co najwyżej zmienić kolejność wyświetlanych elementów (ewent. wywalić to, czego nie potrzebujesz).
Niedawno zaistniejwsieci napisał jak on dodaje do postów obrazki w oparciu o custom fileds -> poszukaj sobie wink.gif.

Kasia


--------------------
Curiosity killed the cat, but satisfaction brought her back.
Go to the top of the page
 
+Quote Post
malyel
post 23.2.2008 - 13:55
Post #3


aktywność:
**

Grupa: +Bloger
Postów: 24

Nr: 2 574



Głownie chodzi mi oto, żeby obok tytułu już zaczynał się obrazek - na wysokości tytułu, tak jak podałem w przykładowych stronach post wyżej. Jeśli już będę mógł tak robić, to oczywiście funkcja "<---more--->" będzie bardzo przydatna.
Go to the top of the page
 
+Quote Post
WPNinja
post 24.2.2008 - 00:25
Post #4


aktywność:
****

Grupa: +Bloger
Postów: 212

Nr: 3 567



http://www.wordpress.org.pl/index.php?show...ost&p=11735


--------------------
Go to the top of the page
 
+Quote Post
Kasia79
post 24.2.2008 - 21:50
Post #5


aktywność:
*******

Grupa: Redakcja
Postów: 868

Nr: 2 641



CYTAT
..żeby obok tytułu już zaczynał się obrazek - na wysokości tytułu, ..
to kwestia css.
Do obrazka musisz przypisac jakiś class, a później w style.css do tego class dopisać float: left (plus pewnie jakiś padding). W samym index.php obrazek musisz umieścić tuż przed tytułem.

Kasia


--------------------
Curiosity killed the cat, but satisfaction brought her back.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



Wersja Lo-Fi Aktualny czas: 19 11 08 - 15:30
Polski Blogger | Forum Komputerowe | Spotkania blogerów