Empty page with children and excerpt images

  • dabrowski

    #721

    I like having the children pages listed since it solves a problem every customer seems to have a different opinion on: Should they put content on a parent page, because they don’t think people will click the parent page intuitively. But if they click it, it shouldn’t be empty. And if I disable it as in the custom menu, it still can be confusing. . .

    At any rate, it would be great to be able to create child pages, and if there is no content in the parent, it won’t show anything but the excerpts of the child pages.

    Secondly,

    I modified the code as the developer suggested in another post to make the child page display its own image. However, it doesn’t seem to be the featured image. Is it supposed to be? Right now, my child pages show an image, and if I add a featured image, it doesn’t use it as the thumbnail; in fact the thumbnail disappears.

    Thanks.

    dabrowski

    #13361

    I duplicated the loop.php page into the child theme and made the following change:

    Code:
    <div id=”post-<?php the_ID(); ?>”
    <?php if ($post->post_content == ”) { echo ‘ class=”hide”‘; } ?>
    <?php if ($post->post_content != ”) { post_class(‘clearfix post’); } ?>>

    If there is no content, it will insert the class of hide, which I have set to display: none. If there is content, it does the same thing it usually does. I tried to get it in one line with an else, but it broke the styles of the child pages, and I didn’t know what was wrong.

    While this is a little more code, it seems to work. Please comment if there is a better way.

    Now I just need to figure out the images for child pages.

    Admin

    Syahir Hakim

    #13362

    Hurm..this is actually a nice mod to that feature. I’ll consider adding this to the theme.

    dabrowski

    #13363

    Cool. I feel so special. I wouldn’t know where to begin implementing it as an option, but it would be cool to have a global setting as well as an over-ride at the page level.

    Still getting used to WordPress customization.

Viewing 4 posts - 1 through 4 (of 4 total)

  • You must be logged in to reply to this topic.