WordPress.org

Support

Support » Themes and Templates » [Resolved] Elbee Elgee Theme – Hide Featured Images?

[Resolved] Elbee Elgee Theme – Hide Featured Images?

  • Hi

    I’m using the Elbee Elgee theme, and have a plugin that calls up featured images to display in a slider on the homepage.

    However, I DON’T want the featured image to also display at the top of the post, because I want more control over where and how it’s show in the article itself. Is there a way to attach a featured image but not have it display automatically with this theme?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Doug
    Member

    @zamoose

    11oneone:

    I’ll be adding this to my FAQ later today.

    1. Make sure you’re using a child theme
    2. Add the following code to your child theme’s functions.php:
      function lbc_remove_postimage(){
          remove_action( 'lblg_before_itemtext', 'lblg_the_postimage' );
      }
      add_action( 'init', 'lbc_remove_postimage' );
    3. Reload the page and check to make sure it worked.

    Thanks for the super-fast response… seems to have worked a treat, though just need to iron-out issues with the slider now!

    Doug
    Member

    @zamoose

    Glad to know it worked for you.

    Can you mark this topic as “resolved”?

    Thanks!

    Oops, sure…

    Daedalon
    Participant

    @daedalon

    What is the proper way to customize the display of featured images in posts instead of completely removing them? As a first step I’d like to have them be displayed with limited max-dimensions, either using WordPress’s pre-resized images, eg. the ‘thumbnail’ size, or by writing the HTML and CSS invocation that limits the size even further. The second step would be to have the featured images be displayed next to the headline.

    Thanks in advance!

    Doug
    Member

    @zamoose

    Daedalon:
    Not sure what you mean — post images in Elbee Elgee default to $content_width, which is 640px in version 1.3.x. I’m reducing it slightly in 1.4.x to 600px.

    What’s the behavior you’re seeing and want to address?

    Daedalon
    Participant

    @daedalon

    Current behavior is exactly as you describe. What would be useful is the ability to alter the way of displaying of the image. For example to define the width, height, max-width, max-height, float, display and other CSS attributes.

    If possible, to alter the place where it’s displayed as HTML in the document would be even better. The best would be to be able to choose whether to display the image for example before, after, to the left of or to the right of the headline, and the size, border, margin and so forth of the post image.

    Doug
    Member

    @zamoose

    Daedalon:
    This could be accomplished through the use of a child theme.

    Simply register some new image sizes via add_image_size() in your child functions.php. Then do a remove_action( 'lblg_before_itemtext', 'lblg_the_postimage' ) to unhook the parent post image functionality. I would then write a conditional function in your child theme that operates as you suggest, with calls to conditionals like is_single() and is_home() in order to determine when to show the fuller-sized image and when to show the thumbnail-ized one.

    I would then hook that replacement function either back in to lblg_before_itemtext or even into lblg_print_title. Then just use the right combo of floats to make those thumbnails appear beside the titles.

    Make sense?

    Doug
    Member

    @zamoose

    Double post. Sorry.

    Daedalon
    Participant

    @daedalon

    Thanks for the tips. I’ll get back to this when the current implementation’s limitations get too hindering to abide. The above seems like it might be just enough to figure the rest to unleash the power of customizing this part of the theme 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] Elbee Elgee Theme – Hide Featured Images?’ is closed to new replies.