tutoriale photoshop, brushes, patterns, gradient
Site afiliat proiectului Wtricks.com
  
   
  REGULAMENT | Search | Members | Calendar | Help 
 


Post Reply  Post Thread 
wordpress afisare
Author Message
flipper
Designer experimentat
*******


Posts: 503
Group: Registered
Joined: Nov 2009
Status: Offline
Reputation: 9
Lei: 1252.47
Post: #1
wordpress afisare

salut. am si eu o problema. de fapt, nu stiu de unde sa incep. vreau ca in wordpress, sa imi arate pe homepage numai articolele dintr-o singura categorie. cum pot face asta? cred ca trebuie umblat in page.php din thema, dar nu stiu unde..

PHP Code:
<?php get_header(); ?>
        
        <div id="content">
        
              <?php if (have_posts()) : ?>

            <?php while (have_posts()) : the_post(); ?>
            
            <div class="post">
            
            <h1><?php the_title(); ?></h1>
            
            <?php edit_post_link(); ?>
            
            <?php the_content(); ?>
            
            </div>
            
            <?php endwhile; ?>
            <?php else : ?>
            <p><?php _e('Sorry, but nothing seems to match what you were looking for.'); ?></p>
            <?php endif; ?>
            
        </div><!--/content-->

<?php get_sidebar(); ?>
    
<?php get_footer(); ?>


aveti idee? va multumesc.


Acelasi pentru toti, diferit pentru fiecare | Banner 125px GRATUIT
01-26-2010 07:48 PM
Visit this users website Find all posts by this user Quote this message in a reply
DarK4EveR
Expert
*********


Posts: 1,274
Group: Registered
Joined: Aug 2007
Status: Away
Reputation: 24
Lei: 4988.22
Post: #2
RE: wordpress afisare

PHP Code:
<?php get_header(); ?>
        
        <div id="content">

<?php query_posts('cat=ID'); ?> 

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

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


ID-ul de la  cat=ID il inlocuiesti cu id-ul categoriei ale carei posts vrei sa le afisezi.

Vezi daca merge.


Daca nu raspund, YM/PM/mail me!
My Twists of Mind  -  Filtre de apa
01-26-2010 08:32 PM
Visit this users website Find all posts by this user Quote this message in a reply
flipper
Designer experimentat
*******


Posts: 503
Group: Registered
Joined: Nov 2009
Status: Offline
Reputation: 9
Lei: 1252.47
Post: #3
RE: wordpress afisare

nu mergeSad


Acelasi pentru toti, diferit pentru fiecare | Banner 125px GRATUIT
01-26-2010 08:53 PM
Visit this users website Find all posts by this user Quote this message in a reply
MoArT3a
Designer incepator
*****


Posts: 232
Group: Registered
Joined: Aug 2009
Status: Offline
Reputation: 4
Lei: 820.81
Post: #4
RE: wordpress afisare
01-26-2010 08:55 PM
Find all posts by this user Quote this message in a reply
flipper
Designer experimentat
*******


Posts: 503
Group: Registered
Joined: Nov 2009
Status: Offline
Reputation: 9
Lei: 1252.47
Post: #5
RE: wordpress afisare

Deja mi-am prins urechile..


Acelasi pentru toti, diferit pentru fiecare | Banner 125px GRATUIT
01-26-2010 09:03 PM
Visit this users website Find all posts by this user Quote this message in a reply
flipper
Designer experimentat
*******


Posts: 503
Group: Registered
Joined: Nov 2009
Status: Offline
Reputation: 9
Lei: 1252.47
Post: #6
RE: wordpress afisare

hai ca am reusit. va multumesc. de fapt, in index.php trebuie modificat, nu in page.php, din fisierele themei.

PHP Code:
<?php get_header(); ?>
        
        <div id="content">
            [b]<?php query_posts('cat=13'); ?> [/b]
              <?php if (have_posts()) : ?>

            <?php while (have_posts()) : the_post(); ?>
            
            <div class="post">
            
            <h1><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
            <p class="small">Scris de mine la data de  <?php the_date(); ?></p>
            
            <?php edit_post_link(); ?>
            
            <?php the_content('<strong>WAIT! There is more to read... read on &raquo;</strong>'); ?>
            
            <div class="postmeta">
            <h4><?php if(function_exists('the_ratings')) { the_ratings(); } ?></h4>
            <h4>Comments: <?php comments_popup_link('Be the First to Comment''Read the First Comment''% Comments to Read''comments-link''Comments are off for this article'); ?></h4>
            <h4>Filed Under: <?php the_category(', '?></h4>
            <?php if ( function_exists('the_tags')) the_tags('<h4>Tags: <span>'', '' </span></h4>'); ?>
            </div>
            </div>
            
            <?php endwhile; ?>
            <?php else : ?>
            <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
            <?php endif; ?>
            
            <div class="content-bot">

            <?php next_posts_link('&laquo; Inapoi'?>
            <?php previous_posts_link('Inainte &raquo;'?></p>

            </div><!--/content-bot-->
            
        </div><!--/content-->

<?php get_sidebar(); ?>
    
<?php get_footer(); ?>


am adaugat codul de la DarK4EveR . multumesc


Acelasi pentru toti, diferit pentru fiecare | Banner 125px GRATUIT
01-26-2010 09:32 PM
Visit this users website Find all posts by this user Quote this message in a reply
DarK4EveR
Expert
*********


Posts: 1,274
Group: Registered
Joined: Aug 2007
Status: Away
Reputation: 24
Lei: 4988.22
Post: #7
RE: wordpress afisare

npc


Daca nu raspund, YM/PM/mail me!
My Twists of Mind  -  Filtre de apa
01-27-2010 11:48 PM
Visit this users website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

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

  




-->