Portfolio not lining out on the left side

Homepage Community Forums Legacy Theme Support Portfolio not lining out on the left side

Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #7472
    George_71
    Customer

      If the the titels one one row of portfolio items are different in length, for example on one, two or three lines, the next row will not line out all the way to the left side. Is there a way to fix this:

      http://www.georgelangenberg.com/blog/

      #7480
      George_71
      Customer

        Hi guys and girls, since I will change the setting from portfolio to blog I show you a picture so you can see what I mean. Thanks for any help in advance, George

        https://www.evernote.com/shard/s80/sh/0b91f697-47e2-44ea-8b93-e1a9e5311a2d/40466685550af7a5d6365f4af9b909f4

        #7496
        Eric
        Customer

          Wes is adding an update that fixes this issue soon. Here is the code that will fix it –

          // Outputs clearing div after every 4 posts
          add_action( 'genesis_after_entry', 'portfolio_after_post' );
          function portfolio_after_post() {
              
          	global $wp_query;
              
              // Assumes 4 posts per row
          	$end_row = ( $wp_query->current_post + 1 ) / 4;
                  
          	if ( ctype_digit( (string) $end_row ) ) {
          		echo '<div class="clear"></div>';	
          	}
          }

          Just add that in your page_portfolio.php file replacing this code –

          // Clear float using genesis_custom_loop() $loop_counter variable
          // Outputs clearing div after every 4 posts
          // $loop_counter is incremented after this function is run
          add_action( 'genesis_entry_footer', 'portfolio_after_post' );
          function portfolio_after_post() {
              global $loop_counter;
              
              if ( $loop_counter == 3 ) {
                  $loop_counter = -1;
                  echo '<div class="clear"></div>';
              }
          }

          I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com

          #7505
          George_71
          Customer

            Hi Eric,

            thanks, replaced the code, but it is no fix, there’s no change in how the portfolio page is being displayed.

            Does WordPress have a cache that needs to be cleared?
            (I have cleared my browsers cache and I don’t use a caching plugin)

            #7522
            Eric
            Customer

              No WP should update it instantly….the only way a cache would need to be cleared is if you’re using a plugin or something…..but hitting your Reload button should do show the latest changes.

              Which page is your portfolio again? If you don’t have one, can you create a sample page?


              I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com

              #7539
              George_71
              Customer

                Hi Eric, thanks so far.
                Here is a sample page.
                http://www.georgelangenberg.com/homepage/

                #7558
                Eric
                Customer

                  Add this to your css since the “.clear” class isn’t present –

                  .clear {
                      clear: both;
                  }

                  I thought you may have already had it in your css, so that should definitely be the last step to get it to clear.


                  I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com

                  #7564
                  George_71
                  Customer

                    Eric you have made me very happy. Thank you!
                    Problem solved :-]

                    #7575
                    Eric
                    Customer

                      You’re Welcome 🙂


                      I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com

                    Viewing 9 posts - 1 through 9 (of 9 total)
                    • The topic ‘Portfolio not lining out on the left side’ is closed to new replies.