← WordPress

Dúvida Urgente!

Lida 2577 vezes

Offline

myStoned 
Membro
Mensagens 663 Gostos 8
Feedback +2

Troféus totais: 29
Trófeus: (Ver todos)
Level 5 Tenth year Anniversary Nineth year Anniversary Mobile User Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter

Código: [Seleccione]
<center><?php if(get_post_meta($post->ID'designed-by')){ ?><li class="designer"><a href="<?php echo get_post_meta($post->ID'designed-by'$single true); ?><img src='http://xxxxxxxxx.com/wp-content/themes/MyXXX/images/autor.png' border='0'/></a></li><?php ?>
            <?php if(get_post_meta($post->ID'web-url')){ ?></center>


Esse código está associado a este elemento da Theme do Wordpress, os outros consegui todos, mas este não estou a conseguir.


O que quero?

  • Basicamente, quero ao invés de apresentar o link como esta agora, apresentar a imagem, como podem ver no código acima, mas não consigo encontrar a localização correcta para colocar a imagem (no código).


Desde já, agradeço bastante!
[/list]
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

Esse codigo tá mal...

Correcto:
Código: [Seleccione]
<center><?php if(get_post_meta($post->ID'designed-by')){ ?><li class="designer"><a href="<?php echo get_post_meta($post->ID'designed-by'$single true); ?>"><img src='http://xxxxxxxxx.com/wp-content/themes/MyXXX/images/autor.png' border='0'/></a></li><?php ?>
            <?php if(get_post_meta($post->ID'web-url')){ ?></center>

Faltava-te fechar a tag a.
Offline

Luís Salvador 
Membro
Mensagens 2068 Gostos 37
Feedback +4

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

E usa " em vez de '

Pelo menos é o que faço... Tirando isso acho que o do ORiOn está certo.
Offline

myStoned 
Membro
Mensagens 663 Gostos 8
Feedback +2

Troféus totais: 29
Trófeus: (Ver todos)
Level 5 Tenth year Anniversary Nineth year Anniversary Mobile User Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter

Esse codigo tá mal...

Correcto:
Código: [Seleccione]
<center><?php if(get_post_meta($post->ID'designed-by')){ ?><li class="designer"><a href="<?php echo get_post_meta($post->ID'designed-by'$single true); ?>"><img src='http://xxxxxxxxx.com/wp-content/themes/MyXXX/images/autor.png' border='0'/></a></li><?php ?>
            <?php if(get_post_meta($post->ID'web-url')){ ?></center>

Faltava-te fechar a tag a.

Já está correctamente, mas agora parece a imagem, e em baixo o endereço, como o removo? Já tentei enumeras vezes e não consigo..

Muito Obrigado a ambos.  :grin: :)
Offline

Luís Salvador 
Membro
Mensagens 2068 Gostos 37
Feedback +4

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

Penso que seja removendo a parte:

Código: [Seleccione]
<?php if(get_post_meta($post->ID'web-url')){ ?>
É o que me parece...
Offline

myStoned 
Membro
Mensagens 663 Gostos 8
Feedback +2

Troféus totais: 29
Trófeus: (Ver todos)
Level 5 Tenth year Anniversary Nineth year Anniversary Mobile User Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter

Penso que seja removendo a parte:

Código: [Seleccione]
<?php if(get_post_meta($post->ID'web-url')){ ?>
É o que me parece...

Já o fiz, e depois aparece-me um Fatal Error..
Offline

Luís Salvador 
Membro
Mensagens 2068 Gostos 37
Feedback +4

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

Apaga também o

Código: [Seleccione]
<?php ?>
que está antes disso.

Isto por vezes por tentativas chega-se lá lol
Offline

myStoned 
Membro
Mensagens 663 Gostos 8
Feedback +2

Troféus totais: 29
Trófeus: (Ver todos)
Level 5 Tenth year Anniversary Nineth year Anniversary Mobile User Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter

Apaga também o

Código: [Seleccione]
<?php ?>
que está antes disso.

Isto por vezes por tentativas chega-se lá lol

Já o fiz, já deixei só esse código, já apaguei essa linha toda e deixei só o </center> e não dá nada!  #-o
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

Podes mostrar o que bem a seguir a esse código sff?
Offline

Luís Salvador 
Membro
Mensagens 2068 Gostos 37
Feedback +4

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

Era isso mesmo que ia pedir... Pelo menos o código de toda a div era o ideal.
Offline

myStoned 
Membro
Mensagens 663 Gostos 8
Feedback +2

Troféus totais: 29
Trófeus: (Ver todos)
Level 5 Tenth year Anniversary Nineth year Anniversary Mobile User Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter

Depois é uma repetição desse código, mas com outros que estão a funcionar correctamente..
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

Depois é uma repetição desse código, mas com outros que estão a funcionar correctamente..

Falta ai código meu...
Com o <?php if(get_post_meta($post->ID, 'web-url')){ ?> tás a abrir um if, já viste se tá fechado?...