Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Wordpress featured content question.

  • 20-01-2011 8:17pm
    #1
    Registered Users, Registered Users 2 Posts: 1,632 ✭✭✭


    Does anyone know how or if I can put a picture into the featured content without having to put the same picture in the post? (Wordpress site)


Comments

  • Registered Users, Registered Users 2 Posts: 16,414 ✭✭✭✭Trojan


    Quick answer: almost certainly you should be able to do it that way. However, like many WordPress questions, the answer to this one is "depends on what theme you're using". The theme authors should have made it so - you might need to add an image URL to a custom field.

    Can you give us more information about your theme or link to your site etc?


  • Registered Users, Registered Users 2 Posts: 1,632 ✭✭✭SuperWoody101


    I had someone do the site for me but can't get in contact with them now. http://www.fighthounds.com sorry for the lack of info. and thanks for the reply.


  • Registered Users, Registered Users 2 Posts: 1,802 ✭✭✭cormee


    Does anyone know how or if I can put a picture into the featured content without having to put the same picture in the post? (Wordpress site)

    If they're contained within different divs, which I'd say they are, it certainly is possible using just CSS.

    .div1 img

    {
    display:none;
    }

    and do nothing for div 2


  • Registered Users, Registered Users 2 Posts: 1,632 ✭✭✭SuperWoody101


    cormee wrote: »
    If they're contained within different divs, which I'd say they are, it certainly is possible using just CSS.

    .div1 img

    {
    display:none;
    }

    and do nothing for div 2

    Thanks for that, but I'm not 100% sure what I do with that code, I just update the site with news posts etc...

    39e545b34778923d12940893b01798c5.jpg


  • Registered Users, Registered Users 2 Posts: 1,802 ✭✭✭cormee


    No, it would involve adding a few lines of code to your CSS files. If you're not sure how to do it I wouldn't risk it if I were you. You could do more bad than good.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 213 ✭✭Hoku


    Using the custom fields is probably your best bet. Just define a field with a name like "featured-image" and put the full URL as it's value.

    Then with a little PHP snippet, you check if a featured article has the custom image defined and if so, display it. Would make sense to have a fallback image in case there is no image defined.

    Wordpress Codex has detailed enough documentation about how to recall the custom fields from within the "Wordpress Loop".
    If you're not very comfortable with accessing and changing the theme files, find somebody who is - I'm sure there are plenty of people browsing this section who would be willing to assist you via PM (including myself).


  • Registered Users, Registered Users 2 Posts: 16,414 ✭✭✭✭Trojan


    Here's an example of using WordPress custom fields I wrote a while back, though as Hoku says, I think the OP may be uncomfortable hacking theme files.


Advertisement