Support » Theme: Maxwell » Missing function in “content-page.php” – maxwell_post_image_page()

  • Resolved camya


    I found a missing implementation problem in the “template-parts” for content. In content.php, content-single.php, and content-slider.php, you use the maxwell_*() functions, which could be easily overwritten in the child theme.

    <?php maxwell_post_image_single(); ?>
    <?php maxwell_post_image_archives(); ?>
    <?php maxwell_slider_image(); ?>

    Thats awesome, because I need to add the image just above “the_content” in order to float it right. It’s easy to implement this. Love it so far. šŸ™‚

    Problem: Unfortunately you use the WordPress stock function the_post_thumbnail() in “template-parts\content-page.php”

    <?php the_post_thumbnail(); ?>

    Because of this, I can’t move the image from the article header to the content area. šŸ™


    Please implement a maxwell_*() function to load the thumbnail in “template-parts/content-page.php” to.

    <?php maxwell_post_image_page(); ?>


    • This topic was modified 7 months, 3 weeks ago by camya.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author ThemeZee


    Hi Andreas,

    Thanks so much for using Maxwell.

    I would argue that the function is not really missing. Adding our own maxwell_*() functions for displaying featured images has the reason that there are either theme options or image links to consider.

    For the featured image on static pages there is no further logic, so adding a custom function in the theme would just be an empty wrapper. Yes, I can see why this could make sense, but decided against.

    You can still modificate the theme as you wish, by overriding the content-page.php template file. I do not see the point what an empty wrapper function improves when you want to change the position of the image.


    Hi Thomas,

    nice to meet you and thank you for your explanation. In the meantime we launched our project, and your theme is really great. šŸ™‚

    If you don’t implement my request, I’m absolute fine with it.

    Following just as an additional explanation.

    I overwrite the function maxwell_post_image_single() {} to hide the image from its default position completely, because this image is added just before the <header class="entry-header"> in the template by default.

    On my website, I needed the image inside the <div class="entry-content clearfix"> just above the_content().

    So I hide the image with maxwell_post_image_single() and pre-pend it in add_action(‘the_content’) above the post content.

    I implemented this for the post with success.

    Unfortunately it’s not possible to hide the image using the stock the_post_thumbnail() function using any available action or filter. So a function maxwell_page_image() is really needed here to accomplish the above requirements.

    So pages on our site still use the default image position above the header, but I’m fine with this. šŸ˜‰

    Have a nice day and greetings from Hamburg,

    Theme Author ThemeZee


    Hi Andreas,

    You can simply override the content-page.php template file directly and remove the call to the_post_thumbnail() completely if you don’t need it, or move its position. No need to touch the template functions.


Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.