Horizontal post info in full-width

Viewing 8 posts - 1 through 8 (of 8 total)
  • #21400
    Marsza
    Participant

    Hi!

    I could not find any solution to my problem so I let myself to create topic for it.

    I’m trying to cheat the system and have single posts in full width layout option, and for a front page I want to use static page with blog template (which uses two columns – one with blog posts, one with sidebar). It works good except that when I set layout option to full width instead of this:
    http://zdnabutelki.cba.pl/a/wp-content/uploads/2015/07/whatiwant.png
    I get this:
    http://zdnabutelki.cba.pl/a/wp-content/uploads/2015/07/notwhatiwant.png
    on a home page.

    Any one can help me how to solve it, because all my ideas failed πŸ™

    #21417
    Daniel Tara
    Keymaster

    If you don’t give me exact information about what you changed and where I can’t help you further. You can use Enlightenment theme which allows by design to have a blog with sidebar and full-width single posts.

    #21434
    Marsza
    Participant

    Up to now I went through following steps:

    1. I created Page. I selected template for it: blog. Saved.

    2. I set hompege settings to: static page and selected page created in step above as the one that should be used.

    At this stage meta formating at hompage was as I wanted it to be. (first image)

    3. Then I went to Theme Options -> Layout, and set it to full-width. Saved.

    And meta formating on a home page created before changed to second image.

    If nothing else will work I will switch themes but I have to admit I really like Pinboard πŸ™

    #21435
    Daniel Tara
    Keymaster

    Open functions.php and clear the contents of the functions pinboard_move_elements() and pinboard_restore_elements(). Don’t delete the functions entirely, just the part between brackets.

    #21436
    Marsza
    Participant

    I’m sorry but Me + PHP = ~0 so I’ve tried to guess what exactly I should delete but it didn’t work :/

    I’ve found mentioned functions as:

    function pinboard_move_elements(container) {
    			if( container.hasClass('onecol') ) {
    				var thumb = $('.entry-thumbnail', container);
    				if('undefined' !== typeof thumb)
    					$('.entry-container', container).before(thumb);
    				var video = $('.entry-attachment', container);
    				if('undefined' !== typeof video)
    					$('.entry-container', container).before(video);
    				var gallery = $('.post-gallery', container);
    				if('undefined' !== typeof gallery)
    					$('.entry-container', container).before(gallery);
    				var meta = $('.entry-meta', container);
    				if('undefined' !== typeof meta)
    					$('.entry-container', container).after(meta);
    			}
    		}
    		function pinboard_restore_elements(container) {
    			if( container.hasClass('onecol') ) {
    				var thumb = $('.entry-thumbnail', container);
    				if('undefined' !== typeof thumb)
    					$('.entry-header', container).after(thumb);
    				var video = $('.entry-attachment', container);
    				if('undefined' !== typeof video)
    					$('.entry-header', container).after(video);
    				var gallery = $('.post-gallery', container);
    				if('undefined' !== typeof gallery)
    					$('.entry-header', container).after(gallery);
    				var meta = $('.entry-meta', container);
    				if('undefined' !== typeof meta)
    					$('.entry-header', container).append(meta);
    				else
    					$('.entry-header', container).html(meta.html());
    			}
    		}

    and also few times as: pinboard_move_elements($(this)); and pinboard_restore_elements($(this));

    I’m guessing the last ones are more like a call, and first ones are declaration, but deleting only “container” word did not work and I think there is something more to it. πŸ™ But I can figure it out and I’m left with such look http://zdnabutelki.cba.pl/a/ πŸ™

    #21437
    Daniel Tara
    Keymaster

    Delete the calls to the functions. You can comment them out and restore them at any point.

    #21942
    braincake
    Participant

    I have this very same problem and I tried commenting out the calls to the function in functions.php, but it does not work.
    I also noticed that, when I use the “no sidebars” template, the info also appears vertically.

    This is my blog page:
    http://www.photo-braincake.com/blog/

    #21945
    braincake
    Participant

    I already found out how to do it.
    I changed this if (every one):

    if( ($(window).width() > 960) || ($(document).width() > 960) ) {
        // Viewport is greater than tablet: portrait
    } else {
       $('#content .hentry').each(function() {
    	pinboard_move_elements($(this));
       });
    }

    To always execute the move elements function.
    I commented it out so I can change it back when I want, but the result is this:

    $('#content .hentry').each(function() {
          pinboard_move_elements($(this));
     });

    The thing is that posts without featured photo look nice now, but the ones with photo don’t. :/
    Is there a way to do this conditionally?

    • This reply was modified 9 years ago by braincake.
Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.