Title: Pages Layout Alignment Different from Posts
Last modified: May 11, 2026

---

# Pages Layout Alignment Different from Posts

 *  Resolved [r3ndy](https://wordpress.org/support/users/r3ndy/)
 * (@r3ndy)
 * [15 hours, 32 minutes ago](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts/)
 * Hi, I wanted to add another issue related to the previous discussion here:
   [https://wordpress.org/support/topic/comment-navigation-appears-twice-after-moving-comment-form/](https://wordpress.org/support/topic/comment-navigation-appears-twice-after-moving-comment-form/)
 * I noticed that on Pages, the text, username, and email positioning/layout is 
   different compared to Posts. Could Pages follow the same layout structure as 
   Posts so the alignment stays consistent across both?
   I’ve also attached screenshots
   for reference:
 * First image: [Pages layout](https://prnt.sc/6GK599N8eR3Y)
   Second image: [Posts layout](https://prnt.sc/rtWNOiQz9m5J)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpages-layout-alignment-different-from-posts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [ying](https://wordpress.org/support/users/yingscarlett/)
 * (@yingscarlett)
 * [15 hours, 22 minutes ago](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts/#post-18905156)
 * Hi there,
 * The link you provided is a single post, can you provide a link to single page
   that has comment enabled so I can compare the two?
 * Let me know 🙂
 *  Thread Starter [r3ndy](https://wordpress.org/support/users/r3ndy/)
 * (@r3ndy)
 * [15 hours, 11 minutes ago](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts/#post-18905161)
 * Hi [@yingscarlett](https://wordpress.org/support/users/yingscarlett/)
 * Unfortunately, I can’t provide publicly accessible active links at the moment.
 * However, these are the URLs I’m comparing:
 * Post:
   [https://yourdomain.com/windows-11-aio/](https://yourdomain.com/windows-11-aio/)
 * Page:
   [https://yourdomain.com/donasi](https://yourdomain.com/donasi)
 * The page layout/alignment looks different from the post layout.
    -  This reply was modified 15 hours, 6 minutes ago by [r3ndy](https://wordpress.org/support/users/r3ndy/).
 *  [ying](https://wordpress.org/support/users/yingscarlett/)
 * (@yingscarlett)
 * [15 hours ago](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts/#post-18905166)
 * The default comment section for both posts and pages are the same.
 * Yours are different likely due to your custom function which inserts the `comment-
   form-comment`.
 * Can you share your custom function here?
 *  Thread Starter [r3ndy](https://wordpress.org/support/users/r3ndy/)
 * (@r3ndy)
 * [14 hours, 36 minutes ago](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts/#post-18905177)
 * Hi [@yingscarlett](https://wordpress.org/support/users/yingscarlett/) , thanks
   for looking into this.
 * I’m not intentionally adding anything related to `comment-form-comment`. The 
   only customizations I made are below (layout + comment form styling and repositioning):
 * **PHP (customizations)**:
 *     ```wp-block-code
       <?phpadd_action( 'wp', function() {    remove_action( 'generate_after_do_template_part', 'generate_do_comments_template', 15 );    add_action( 'generate_before_comments_container', 'generate_do_comments_template' );});add_action( 'wp_head', function() {    ?>    <style>        #comments {            display: flex !important;            flex-direction: column !important;        }        #respond {            order: -1 !important;            margin-bottom: 30px !important;            border-bottom: 2px solid #eeeeee;            padding-bottom: 20px !important;        }        .comments-title, .comment-list, .comment-navigation {            order: 1 !important;        }        .comment-form {            display: grid !important;            grid-template-columns: repeat(2, 1fr);            gap: 15px;        }        .comment-form-comment, .custom-comment-notes, .form-submit, .comment-form-cookies-consent {            grid-column: span 2;        }        @media (max-width: 768px) {            .comment-form { grid-template-columns: 1fr; }        }    </style>    <?php});add_filter( 'comment_form_defaults', function( $defaults ) {    $defaults['comment_notes_before'] = '    <div class="custom-comment-notes" style="margin-bottom:15px; font-size:14px; color:#aaa;">        <p>Gunakan email valid agar kamu mendapat notifikasi balasan.</p>        <p>Kirim <a href="https://prnt.sc/" target="_blank" rel="nofollow noopener noreferrer">screenshot</a> komentar kamu di sini.</p>    </div>';    return $defaults;});add_filter( 'comment_form_fields', function( $fields ) {    if ( isset($fields['comment']) ) {        $comment_field = $fields['comment'];        unset($fields['comment']);        $fields['comment'] = $comment_field;    }    return $fields;});?>
       ```
   
 * **CSS:**
 *     ```wp-block-code
       #comments {    display: flex !important;    flex-direction: column !important;}#respond {    order: -1 !important;    margin-bottom: 40px !important;    border-bottom: 1px solid #ddd !important;    padding-bottom: 20px !important;}.comments-title, .comment-list {    order: 1 !important;}.custom-comment-notes {    margin-bottom: 15px;    line-height: 1.4;    padding-bottom: 10px;}.custom-comment-notes p {    margin: 0 !important;    font-size: 14px;    color: #666;}.custom-comment-notes a {    color: #a48eff;    text-decoration: underline;}.custom-comment-notes a:hover {    color: #ff0000;}.comment-navigation:first-of-type {    display: none;}
       ```
   
 *  [ying](https://wordpress.org/support/users/yingscarlett/)
 * (@yingscarlett)
 * [14 hours, 27 minutes ago](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts/#post-18905182)
 * Try adding this CSS:
 *     ```wp-block-code
       p.comment-form-comment {    order: -1;}form#commentform {    display: flex;    flex-direction: column;}.comment-form #author, .comment-form #email, .comment-form #url {    margin-right: auto;}.custom-comment-notes {    order: -2;}
       ```
   
 *  Thread Starter [r3ndy](https://wordpress.org/support/users/r3ndy/)
 * (@r3ndy)
 * [14 hours, 11 minutes ago](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts/#post-18905189)
 * Hi [@yingscarlett](https://wordpress.org/support/users/yingscarlett/)
 * The code is working now. I’d also like to add a message under “Leave a Comment”
   on Pages so it matches the Posts as well.
 * “Use a valid email so you’ll receive reply notifications.
   Upload your [screenshot](https://prnt.sc/)
   here, then paste the link in the comment field.”
 *  [ying](https://wordpress.org/support/users/yingscarlett/)
 * (@yingscarlett)
 * [13 hours, 29 minutes ago](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts/#post-18905204)
 * You are using this filter to add the note?
 *     ```wp-block-code
       add_filter( 'comment_form_defaults', function( $defaults ) {    $defaults['comment_notes_before'] = '    <div class="custom-comment-notes" style="margin-bottom:15px; font-size:14px; color:#aaa;">        <p>Gunakan email valid agar kamu mendapat notifikasi balasan.</p>        <p>Kirim <a href="https://prnt.sc/" target="_blank" rel="nofollow noopener noreferrer" style="color:#0033ff;">screenshot</a> komentar kamu di sini.</p>    </div>';    return $defaults;});
       ```
   
 * It should work for both pages and posts. if not, try replacing it with this:
 *     ```wp-block-code
       // Change the priority from the default 10 to 20add_filter( 'comment_form_defaults', function( $defaults ) {    $defaults['comment_notes_before'] = '    <div class="custom-comment-notes" style="margin-bottom:15px; font-size:14px; color:#aaa;">        <p>Gunakan email valid agar kamu mendapat notifikasi balasan.</p>        <p>Kirim <a href="https://prnt.sc/" target="_blank" rel="nofollow noopener noreferrer" style="color:#0033ff;">screenshot</a> komentar kamu di sini.</p>    </div>';    return $defaults;}, 20 ); // Increased priority
       ```
   
 *  Thread Starter [r3ndy](https://wordpress.org/support/users/r3ndy/)
 * (@r3ndy)
 * [13 hours, 10 minutes ago](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts/#post-18905212)
 * Hi [@yingscarlett](https://wordpress.org/support/users/yingscarlett/)
 * I’ve added your code, but it doesn’t seem to work on my side. The message under“
   Leave a Comment” is not appearing on Pages.
 * I’m currently using this filter as well:
 *     ```wp-block-code
       add_filter( 'comment_form_defaults', function( $defaults ) {    $defaults['comment_notes_before'] = '    <div class="custom-comment-notes" style="margin-bottom:15px; font-size:14px; color:#aaa;">        <p>Gunakan email valid agar kamu mendapat notifikasi balasan.</p>        <p>Kirim <a href="https://prnt.sc/" target="_blank" rel="nofollow noopener noreferrer" style="color:#0033ff;">screenshot</a> komentar kamu di sini.</p>    </div>';    return $defaults;}, 20 );
       ```
   
 * Could you please check if something in the theme or another filter is overriding
   this on Pages?
 *  [ying](https://wordpress.org/support/users/yingscarlett/)
 * (@yingscarlett)
 * [13 hours ago](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts/#post-18905215)
 * I’ve tested the code on my site, and it works. In this case, I would suggest 
   contacting WP’s support as this is a WP filter, it should work no matter what
   theme you are using.
 *  Thread Starter [r3ndy](https://wordpress.org/support/users/r3ndy/)
 * (@r3ndy)
 * [8 hours, 43 minutes ago](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts/#post-18905265)
 * Hi [@yingscarlett](https://wordpress.org/support/users/yingscarlett/)
 * Following advice from the WordPress support forum, I was asked to continue this
   investigation here.
 * WordPress support thread reference:
   [https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts-2/](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts-2/)
 * I’m still experiencing a layout alignment difference between Pages and Posts 
   on my site.
 * WordPress version: 6.9.4
 * Example:
   Post: [https://yourdomain.com/windows-11-aio/](https://yourdomain.com/windows-11-aio/)
   Page: [https://yourdomain.com/donasi/](https://yourdomain.com/donasi/)
 * The WordPress moderator suggested the issue may be related to theme-level layout
   settings or template differences between posts and pages.
 * I have already checked:
    - Layout settings in GeneratePress Customizer
    - Page vs Post layout configuration
    - Container / layout settings
 * But the issue still persists.
 * Could you please confirm:
    - Whether GeneratePress applies different default layout wrappers for Pages 
      vs Posts?
    - Or if there is a known condition where Elements/hooks could affect only Pages?
 * Thank you.
 *  Thread Starter [r3ndy](https://wordpress.org/support/users/r3ndy/)
 * (@r3ndy)
 * [7 hours, 23 minutes ago](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts/#post-18905307)
 * Hi GeneratePress team,
 * I’ve identified the root cause of the issue I was experiencing with different
   layout behavior between Pages and Posts.
 * The issue was caused by missing “Location” settings in GeneratePress Elements.
   Once I included both Pages and Posts in the display rules, everything worked 
   correctly.
 * Thank you for the flexibility and well-structured theme system, it made troubleshooting
   very clear and manageable.
 * Best regards

Viewing 11 replies - 1 through 11 (of 11 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpages-layout-alignment-different-from-posts%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/generatepress/3.6.1/screenshot.
   png)
 * GeneratePress
 * [Support Threads](https://wordpress.org/support/theme/generatepress/)
 * [Active Topics](https://wordpress.org/support/theme/generatepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/generatepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/generatepress/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [r3ndy](https://wordpress.org/support/users/r3ndy/)
 * Last activity: [7 hours, 23 minutes ago](https://wordpress.org/support/topic/pages-layout-alignment-different-from-posts/#post-18905307)
 * Status: resolved