• GeraldW

    (@geraldw)


    I have two types of circles on my site, ones with images and ones with just text.

    I only want the circles with text in them to link to anything. Currently I’m using a plugin to redirect those circles to a subdomain on my site, this works perfectly.

    BUT as the circles with images in them are only there as “decoration” and don’t link to any content or a new domain I don’t want them to behave like they link somewhere (when you hover they take the cursor away and give you a hand) so it looks like they link to new content. Currently I have those circles re-direct back to the main page (where they are located) so it is a clumsy work around. It refreshes the page and nothing new appears.

    is there a way of removing the .blog .hentry a. attachment-post-thumbnail area of the styles sheet so that those circles don’t link to anything?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Caroline Moore

    (@sixhours)

    This is possible with some coding. You could check to see if a featured image is present in the post with an IF statement and if so, do not output a link, and if no featured image is present, just output the post title and link.

    This is an advanced customization so I can’t write the code for you, but you can see how similar IF statements are written within content-home.php and adjust them within a child theme to work for your purposes. Good luck!

    Thread Starter GeraldW

    (@geraldw)

    Hi Caroline,

    I was given this piece of code:

    <?php if ( has_post_thumbnail()) { ?>
    <?php } else { ?>
    	<?php the_title(); ?>
    <?php } ?>

    but I’m not sure where to put it. I stuck it into a content-home.php file in my child theme but that broke everything on the site!

    Is there a particular spot in the original content-home.php that I should be looking at?

    Theme Author Caroline Moore

    (@sixhours)

    As long as you put it outside any opening/closing PHP braces or existing IF statements in content-home.php, it should not break anything. But it’s not a complete piece of code from what I can tell — it will output the post title if the post does not have a Featured Image assigned.

    Thread Starter GeraldW

    (@geraldw)

    Where as I want the opposite… sort of.

    As outputing a post title link is on by default, this is only confirming it?

    Where as I want it to remove what is on by default, but only if the post has a featured image…

    So the code in its current form won’t work =\

    soulint

    (@soulint)

    Could anyone elaborate on this issue, please? I have exactly the same problem.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Make a circle with an image not link to anything’ is closed to new replies.