← PHP

Duvidas no php - wordpress

Lida 2799 vezes

Offline

betanalista 
Membro
Mensagens 2564 Gostos 0
Feedback +18

Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

bem tenho andado por aqui a pesquisar e a bater com a cabeça na parede e não estou a conseguir resolver isto:

Código: [Seleccione]
<?php $recent = new WP_Query("cat=<? echo $wt_featured; ?>&showposts=4"); while($recent->have_posts()) : $recent->the_post();?>
como posso mudar isso para ser baseado no plugin "the_views"



Código: [Seleccione]
<h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
como posso definir ai um numero máximo de caracteres no titulo, ou seja se tiver no título xxxxxxxx xxxxxxxxxx ficar algo assim xxxxxxxx xxx...


 :wink:
Offline

betanalista 
Membro
Mensagens 2564 Gostos 0
Feedback +18

Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

o segundo problema já consegui resolver, o primeiro não me estou a safar...

sugestões?  :wink:
Offline

w1ww 
Membro
Mensagens 9 Gostos 0
Troféus totais: 17
Trófeus: (Ver todos)
Super Combination Combination Poll Voter Level 3 Level 2 Level 1 First Post Karma Nineth year Anniversary Eighth year Anniversary

<?php $recent = new WP_Query("cat=$wt_featured&showposts=4"); while($recent->have_posts()) : $recent->the_post();?>

Esse echo estava ai' mal!
Offline

betanalista 
Membro
Mensagens 2564 Gostos 0
Feedback +18

Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

pk?  :wink:
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

pk?  :wink:

Tinhas <? ?> dentro de <?php ?>.

<?php $recent = new WP_Query("cat=<? echo $wt_featured; ?>&showposts=4"); while($recent->have_posts()) : $recent->the_post();?>
Offline

betanalista 
Membro
Mensagens 2564 Gostos 0
Feedback +18

Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

 :shock:

tem razão  #-o
Offline

w1ww 
Membro
Mensagens 9 Gostos 0
Troféus totais: 17
Trófeus: (Ver todos)
Super Combination Combination Poll Voter Level 3 Level 2 Level 1 First Post Karma Nineth year Anniversary Eighth year Anniversary

Exacto ;), devia ter explicado logo!