Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

111
Vistas
How to apply javascript to all Tumblr posts in main feed instead of just most recent post

JS total noob here.

I'm trying to apply this code inside tumblr theme file but it's only getting applied to the most recent post in the main feed. This is to show comment count for disqus but using {sourcelurl}

{block:ContentSource}
<a href="{permalink}" id="disqus-comment-count">0</a>Comments
<script>
let sourceurl = '{sourceurl}'
var disqusVar = sourceurl.replace("https://href.li/?","") + '#disqus_thread';
$("#disqus-comment-count").attr("data-disqus-url", disqusVar);
</script>
{/block:ContentSource}

For those wondering, the script needs to be wrapped inside {block:ContentSource}{/block:ContentSource} for {sourceurl} variable to work.

Any idea why this might be?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda