• Hi,

    This might be a very simple error but after hours of searching i haven’t found the solution for it.

    I’m calling the specific content from a page in my front-page. There’s an image with a link that’s not working. When I view the page outside the frontpage the link on the image works, but on the front page the image is not clickable at all, and any links inserted after it won’t work either. When I inspect the image it appears as not having any link, as if the hyperlink had been erased.

    I’d really appreciate any help!

    This is my site: http://escueladegaraje.com/

    The php on my front-page where I call the content:

    <?php get_header(); ?>

    <div id=”frontPage”>
    <div class=”frontHeader”>

    <div class=”mensaje”>
    Una escuela diseñada para aprender, no para ensenãr; para encontrarse y experimentar.
    </div>

    <div class=”submensaje”>

    <?php
    $my_id = 614;
    $post_id_5369 = get_post($my_id);
    $content = $post_id_5369->post_content;
    $content = apply_filters(‘the_content’, $content);
    $content = str_replace(‘]]>’, ‘]]>’, $content);
    echo $content;
    ?>

    </div>

    <div class=”caja_der”>
    <?php echo do_shortcode(‘[get_latest_tweets username=”porlosagentes”]’) ?>

    <div class=”subscribebox”>
    <span class=”naranja_sus”>Escribe tu correo para recibir noticias</span>
    <input size=”1″ style=”margin-top:10px” id=”mce-EMAIL” class=”email” name=”EMAIL” type=”email” />
    <style>
    input {
    resize: horizontal;
    width: 100%;
    }
    input:active {
    width: auto;
    }
    input:focus {
    min-width: 100%;
    }
    </style>
    <input id=”mc-embedded-subscribe” size=”1″ style=”margin-top:10px” class=”button” name=”Suscribirse” type=”submit” value=”Suscribirse” />
    </div>
    </div>

    <?php echo do_shortcode(‘[events_list limit=”4″]’) ?>

    </div>

    <footer class=”bottom”>
    </footer>

    </div>
    </div>

    <?php get_footer(); ?>

Viewing 15 replies - 1 through 15 (of 28 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Not sure what you mean, in that code there are no anchor tags so I can’t see how there should be a link.

    Thread Starter novisibles

    (@novisibles)

    Hi Andrew,
    That code is on the front-page.php file where I’m calling the content from a specific page,
    which is this content:

    <!–
    La Escuela de Garaje es un proyecto de re-territorialización y descentralización proponiendo una idea del arte y la educación como un territorio. Curado actualmente por Laagencia, una oficina de proyectos de arte basada en Bogotá desde el 2010.

    En esta pagina puede encontrar en color <span class=”azul”>azul</span> los programas de las versiones temáticas y temporales que se llevan a cabo desde el 2013; en color <span class=”naranja”>naranja</span> puede encontrar todo lo relacionado con las fases de investigación y producción del XV Salón Regional Zona Centro.

    <h3 style=”text-align: left; padding-left: 0px;”><span class=”naranja”><span class=”naranja”>Descargue el PDF de la programación aquí</span></h3>

    <img class=”alignnone size-full wp-image-1809″ src=”http://escueladegaraje.com/wp-content/uploads/2014/10/paola_gaviria_programa-e1434581428568.jpg&#8221; alt=”paola_gaviria_programa” />
    –>

    The last block is the image with the link, and it’s not working… ?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Could you edit that in your forum post and wrap it in backticks please? Copy and paste the code again because it’s likely been corrupted by this forum’s parser.

    Thread Starter novisibles

    (@novisibles)

    ...
    
    <h3 style="text-align: left; padding-left: 0px;">
      <a class="item" href="http://escueladegaraje.com/wp-content/uploads/2015/06/escueladegaraje_junnio17_1.pdf">
        <span class="naranja">
          <span class="naranja">Descargue el PDF de la programación aquí</span>
      </a>
    </h3>
    
    <a href="http://escueladegaraje.com/wp-content/uploads/2015/06/escueladegaraje_junnio17_1.pdf">
      <img class="alignnone size-full wp-image-1809" src="http://escueladegaraje.com/wp-content/uploads/2014/10/paola_gaviria_programa-e1434581428568.jpg" alt="paola_gaviria_programa" />
    </a>
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Is it because of invalid HTML? You’ve got 2 span elements, but you only close one.

    Thread Starter novisibles

    (@novisibles)

    No, I tried that already and it didn’t work ;S

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Does the issue persist with all plugins deactivated?

    Thread Starter novisibles

    (@novisibles)

    No, I tried it and still doesn’t work :s

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What happens if you don’t do your str_replace?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I mean, if you var_dump this:

    $content = $post_id_5369->post_content;

    Does that have the link?

    Thread Starter novisibles

    (@novisibles)

    Yes, this line has the link.
    What do you mean by var_dump ?
    sorry, I’m not that good at php..

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Sorry I mean this:

    $content = $post_id_5369->post_content;
    var_dump($content);

    So, that will dump out the contents of ‘$content‘ on your Webpage, allowing you to see inside of it.

    Thread Starter novisibles

    (@novisibles)

    This didn’t fix it either …

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Are you working with a theme you’ve downloaded? I assume this is a theme problem.

    Thread Starter novisibles

    (@novisibles)

    It’s a basic theme that was modifed

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘Image link not working – frontpage’ is closed to new replies.