tutoriale photoshop, brushes, patterns, gradient
Site afiliat proiectului Webmaster Forums
  ”Tutoriale  
   
  REGULAMENT | Search | Members | Calendar | Help 
 


Post Reply 
articol scurt
02-24-2010, 09:52 PM
Post: #1
articol scurt
Va salut. Vreau sa modific o thema de wordpress. De fapt, lucrul asta l-am cautat de cand m-am apucat sa ma joc cu theme de WP. Imi arata inclusiv pe pagina principala, inclusiv in categorii, arhiva etc, articolele intregi, unele sub altele. Eu vreau sa imi arate doar.. 100 de caractere, sa-i zicem, dupa care sa apara acel link "citeste tot articolul". Aveti idee cum as putea sa fac? Se pare ca ar exista deja facut linkul de "read more", dar nu este activat. De ce oare? Eu cred ca nu sunt puse niste conditii, pentru numarul de caractere, etc, dar in nici o thema n-a gasit acest cod. Ma puteti ajuta, va rog frumos?

PHP Code:
<?php if (have_posts()) : ?>
<?php 
while (have_posts()) : the_post(); ?>
            <div class="apost">
                <div class="date"><span><?php the_time('d'?></span><?php the_time('M'?></div>
                <div class="ahead"></div>
                <h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
                <span class="ptime"><?php the_category(', '?></span>
                <!-- spost -->

<?php the_content('Read the rest of this entry &raquo;'); ?>

                <!-- epost -->
                <div class="pfoot">
                    <span class="pfl"><?php comments_number('No comments''1 comment''% comments' );?><?php edit_post_link('Edit post'' | '''); ?> | <a href="<?php the_permalink() ?>">read more &raquo;</a></span>
                </div>
            </div>
<?php endwhile; ?>

Va multumesc anticipat.

Acelasi pentru toti, diferit pentru fiecare | Banner 125px GRATUIT
Visit this user's website Find all posts by this user
Quote this message in a reply
02-24-2010, 10:49 PM
Post: #2
RE: articol scurt
Trebuie sa vezi pe unde e, ce si cum face functia the_content().

- Primim gratis, sa oferim gratis
Cursuri online | PHP - MySQL | Jocuri flash
Visit this user's website Find all posts by this user
Quote this message in a reply
02-24-2010, 11:02 PM
Post: #3
RE: articol scurt
Multumesc pentru sfat. O sa caut acum in fisierele themei unde este functia asta.

Acelasi pentru toti, diferit pentru fiecare | Banner 125px GRATUIT
Visit this user's website Find all posts by this user
Quote this message in a reply
02-24-2010, 11:10 PM
Post: #4
RE: articol scurt
Nu stiu daca am inteles bine, dar vezi ca atunci cand scrii un text, editorul are si optiunea <!--more--> pe care o poti adauga fix unde doresti, dupa 2, 3, 4, 24 etc. randuri.

AVDACES FORTUNA IVAT
http://fitstore.ro | http://fitclub.ro
Visit this user's website Find all posts by this user
Quote this message in a reply
02-25-2010, 12:13 AM
Post: #5
RE: articol scurt
flipper daca gasesti te rog sa ma anunti si pe mine ca si eu am nevoie.Mersi!
Visit this user's website Find all posts by this user
Quote this message in a reply
02-25-2010, 01:10 AM
Post: #6
RE: articol scurt
PHP Code:
<?php if (have_posts()) : ?>
<?php 
while (have_posts()) : the_post(); ?>
            <div class="apost">
                <div class="date"><span><?php the_time('d'?></span><?php the_time('M'?></div>
                <div class="ahead"></div>
                <h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
                <span class="ptime"><?php the_category(', '?></span>
                <!-- spost -->

<?php the_content_limit(100'Read the rest of this entry &raquo;'); ?>

                <!-- epost -->
                <div class="pfoot">
                    <span class="pfl"><?php comments_number('No comments''1 comment''% comments' );?><?php edit_post_link('Edit post'' | '''); ?> | <a href="<?php the_permalink() ?>">read more &raquo;</a></span>
                </div>
            </div>
<?php endwhile; ?>

Working on my new project... DND!
Find all posts by this user
Quote this message in a reply
02-25-2010, 11:26 PM
Post: #7
RE: articol scurt
Salut casparel si multumim de ajutor.Poti sa-mi arati unde modific limita de caractere/cuvinte? Nu imi pot da seama.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-25-2010, 11:41 PM
Post: #8
RE: articol scurt
<?php the_content_limit(100,

modifici cu alt numar.. insa mie imi da eroare cand pun chestia asta..

Acelasi pentru toti, diferit pentru fiecare | Banner 125px GRATUIT
Visit this user's website Find all posts by this user
Quote this message in a reply
02-26-2010, 03:06 AM
Post: #9
RE: articol scurt
flipper incearca <?php the_content_limit(100, ""); ?> si zi-mi daca iti merge.Mersi! Big Grin
Visit this user's website Find all posts by this user
Quote this message in a reply
02-26-2010, 03:37 AM
Post: #10
RE: articol scurt
@flipper: daca nu spui si ce eroare... ma indoiesc ca o sa-ti dea cineva rezolvarea Smile

Working on my new project... DND!
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


 

 Invatam Net
Esti nou pe aici? Vorbeste-ne despre tine.
Citeste articole si tutoriale unice.
Ai un site? Iti putem oferi un review.

  Parteneri

  

  

  

  

  

  

  Affiliate Banner