Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5991

    I am starting to get the hang of how page templates are made.

    One thing I need to do is create my own page layout NOT template as I need to position elements differently on certain pages. At the moment I can see all the options on the drop down on the right with smal, medium images etc. Where are those templates stored?

    I want to create a new Overwrite default Blog Post Layout, something where the sidebar is not going all the way down to the footer, something where I can make something like

    CONTENT—-SIDEBAR


    COMMENTS


    or


    GALLERY


    as opposed to

    CONTENT—-SIDEBAR

    COMMENTS-SIDEBAR CONTINUED

    so that I can remove a lot of white space

    For that I need to make a new layout…where are those stored?

    Thanks in advance

    #52503

    Hey,

    I forwarded the question to Kriesi – I’m not sure what’s the best way to achieve what you want.

    #52504

    But did you get what I meant?

    The issue with the sidebar is that sometimes it wastes a lot of wipespace as you scroll down

    Maybe an easier way to explain it would be to be able to have the gallery taking the full width of the page with the post content and the sidebar above it. Otherwise on pages with tons of photos we lose a lot of space because of the sidebar. So I would need to have a if then in the layout to check if there is a gallery if that is possible

    Maybe the trick would be to create a new custom field call gallery and enter the shortcode in there and have the template simply use that shortcode so that way you can still control the gallery and exclude images if needed.

    maybe something like <?php echo do_shortcode(‘[gallery]‘); ?> I would have to tweak it so that it would pick up the content of the custom field called gallery

    #52505

    Basically I understand what you’re heading for but I see no way to implement this in the current content column structure. The sidebars are seperated areas and it’s not possible to float the main content around the sidebar or to float it after the sidebar content/div is closed. I think you’re looking for something like: http://css.maxdesign.com.au/floatutorial/introduction19.htm (in our case the red square is the sidebar) but the theme/html structure doesn’t allow to float the areas in this way. Maybe Kriesi knows a solution so we’ll wait for his comment.

    #52506

    I found the solution. It involves tweaking the single.php page

    I created a new custom field called gallery where I put the gallery shortcode generated by wordpress. I then edited the bottom of single.php and added.

    <div class='container'>
    <?php if ( get_post_meta($post->ID, 'gallery', true) )
    echo do_shortcode(get_post_meta($post->ID, 'gallery', $single = true));
    ?></div>

    after the last </div>

    That way the gallery shows below the div that contains the post and the sidebar and the gallery takes the whole width of the page saving a lot of white space if you have 50 photos in rows of 5 for example.

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

The topic ‘Custom Layout for posts’ is closed to new replies.