← WordPress

Colocar anúncios em baixo dos posts

Lida 3971 vezes

Offline

HawK 
Membro
Mensagens 1698 Gostos 0
Feedback +8

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

Queria por anúncios em baixo de cada post, ainda no rectângulo branco mas no fundo, alguém me ajuda por favor ? Geralmente costumo conseguir no index.php neste tema não quer funcionar -.-'
Offline

Jóni Oliveira 
Administrador
Mensagens 3428 Gostos 395
Feedback +28

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

index ? Página principal..

Se queres meter nos posts é no single.php
Offline

HawK 
Membro
Mensagens 1698 Gostos 0
Feedback +8

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

index ? Página principal..

Se queres meter nos posts é no single.php
Na pagina principal sim !
Offline

AnaMartelo 
Administrador
Mensagens 2071 Gostos 25
Feedback +28

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

Se já tiveres excedido o limite de anúncios por página, eles não aparecem..
Se não, deves meter o anúncio dentro da div do "content".
Offline

HawK 
Membro
Mensagens 1698 Gostos 0
Feedback +8

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

Se já tiveres excedido o limite de anúncios por página, eles não aparecem..
Se não, deves meter o anúncio dentro da div do "content".
Já tentei isso, fica no final da pagina, cá vai o meu index.php:




Código: [Seleccione]
<?php
/**
 * @package WordPress
 * @subpackage Martin
 * @since Martin 1.0
 */

get_header(); ?>


<div id="content-container">
<div id="content" role="main">
<?php get_template_part'loop''index' );teste?>
</div><!-- #content -->
</div><!-- #content-container -->
teste
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-18741783-2']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Offline

AnaMartelo 
Administrador
Mensagens 2071 Gostos 25
Feedback +28

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

Não sou pró, mas diria que é aqui:

<div id="content-container">
         <div id="content" role="main">
         <?php get_template_part( 'loop', 'index' );teste; ?>
         <PUBLICIDADE>
                        </div><!-- #content -->
      </div><!-- #content-container -->
Offline

HawK 
Membro
Mensagens 1698 Gostos 0
Feedback +8

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

Já eu experimentei isso antes, e nada, fica no fundo da pagina, verifica em:
http://piadascurtas.org/

Foi a primeira coisa que experimentei.
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

Não tens outro ficheiro pelo qual o index.php se "alimenta"? Ao que parece tens:

get_template_part( 'loop', 'index' )
Offline

Nuno 
Administrador
Mensagens 7780 Gostos 216
Feedback +2

Troféus totais: 42
Trófeus: (Ver todos)
100 Poll Votes Level 7 Search Mobile User Level 6 Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes

Sim, as novas themes vão buscar o chamado index ao loop.php

que é onde se encontra o loop dos posts...
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

Então é o loop.php que tens que alterar. Mete aqui o código do mesmo...
Offline

HawK 
Membro
Mensagens 1698 Gostos 0
Feedback +8

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

Sim, as novas themes vão buscar o chamado index ao loop.php

que é onde se encontra o loop dos posts...
Não fazia ideia.

Obrigado Luís Salvador.