WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Elbee Elgee Theme - Hide Featured Images? (11 posts)

  1. 11oneone
    Member
    Posted 2 years ago #

    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?

  2. Doug
    Member
    Posted 2 years ago #

    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.
  3. 11oneone
    Member
    Posted 2 years ago #

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

  4. Doug
    Member
    Posted 2 years ago #

    Glad to know it worked for you.

    Can you mark this topic as "resolved"?

    Thanks!

  5. 11oneone
    Member
    Posted 2 years ago #

    Oops, sure...

  6. Daedalon
    Member
    Posted 2 years ago #

    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!

  7. Doug
    Member
    Posted 2 years ago #

    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?

  8. Daedalon
    Member
    Posted 2 years ago #

    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.

  9. Doug
    Member
    Posted 2 years ago #

    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?

  10. Doug
    Member
    Posted 2 years ago #

    Double post. Sorry.

  11. Daedalon
    Member
    Posted 2 years ago #

    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 :)

Topic Closed

This topic has been closed to new replies.

About this Topic