• Hello Alexander!

    I would like to make the content of pages and posts (using page.php and single.php) to align left instead of center and thereby always match the top left position of content in the masonry grid. I’m messing around with the style.css without finding the solution…. I’m guessing I should remove/adjust some instance(s) of “margin-left: auto; margin-right: auto” in the .entry class?

    Thankfully awaiting your answer!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Alexander Agnarson

    (@alxmedia)

    Hi there!

    Try adding this in Customize > Additional CSS:

    .post-wrapper { margin: 0; } 
    Thread Starter joxyzan

    (@joxyzhan)

    That did the trick – thank you!

    A related question arises though: When I input a masonry-div with posts on one of these pages (using shortcode from the plugin “Code Snippet”) the size and design of the posts listed differ from the posts on the front page and it gets messy… Do you happen to know a solution for that?

    The code I input:

    <div class="masonry" id="masonry">
    <?php
    if ( is_user_logged_in() ):
    
        global $current_user;
        wp_get_current_user();
        $author_query = array('posts_per_page' => '-1','author' => $current_user->ID);
        $author_posts = new WP_Query($author_query);
        while($author_posts->have_posts()) : $author_posts->the_post();
        ?>
    			<?php get_template_part('content'); ?>
        <?php endwhile;
    
    else :
    
        echo "not logged in";
    
    endif;
    ?>
    </div>
    Theme Author Alexander Agnarson

    (@alxmedia)

    Hm, got any screenshot or live link to the issue?

    Thread Starter joxyzan

    (@joxyzhan)

    Posts (that are ads really) looking good at index.php:

    Same posts looking messy at page.php:

    Thread Starter joxyzan

    (@joxyzhan)

    I should mention that I took off from the original layout and structure quite a bit. But the index.php and page.php are the original ones!

    I should also mention that I’m not an expert at WordPress… This is a prototype for an app and I’m working with trial and error ??

    So: Putting a masonry-div on a page.php maybe isn’t that common…. But I managed to get the same look at same point! I guess it has to do with the div-classes the query is put within? At index.php it’s only <div class=”content”> while on the the page.php it’s <div class=”content” + “entry-content” + “entry themeform”…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Align pages left’ is closed to new replies.