• Resolved Anthyx

    (@anthyx)


    Hi,

    got quite a problem with my new twenty eleven wordpress site: it’s basically a static pages site, but I’ve added a “blog” page too, for news and so on.

    Now, using the header, footer and style configuration files of the twenty eleven child theme I’ve been able to arrange the basic layout of the pages.

    Problem are the posts: meaning the “main” posts page, the one with all the posts in chronological order, and the “basic” page of every single post.

    It seems to me that “posts” do not follow the static page layout rules. In my specific case, got the following problems:

    1) The title of the “main” post page and of every single post is just below the menu, without any space. This way the Polylang switch language button that I’ve placed under the menu bar, appear as usual, but don’t work.

    2) There are a “Previous” button and some information (like posting date), I don’t want to appear.

    Could you help telling me which is the posts layout file to change in order to get the desired layout?

    Many thanks in advance.

    Ciao

    A.

Viewing 5 replies - 1 through 5 (of 5 total)
  • If you are editing the theme template files directly, I would highly recommend creating a child theme — especially when editing a default WordPress theme like Twenty Eleven. Otherwise, when you update to the next version of WordPress, all of your changes will be lost.

    That said, the blog template is typically controlled by index.php (or home.php if it exists), and the single posts are handled by single.php. See WordPress Template Hierarchy for more info.

    Twenty Eleven also supports Post Formats, so all of the code that occurs inside The Loop is located in content.php or content-{type}.php.

    Thread Starter Anthyx

    (@anthyx)

    Hi Shaun, and tnx for the advices, I’ll try to explain better my problem:

    In my twenty eleven child theme I’ve placed a couple of buttons, needed to polylang multi-language plug-in, just under the menu bar, on the right.

    In style.css I’ve added this code:

    .lang-switch {float:right;}
    .lang-item {display: inline; list-style: none;}

    At the very bottom of the header php I’ve inserted this code:

    <ul class=”lang-switch”><?php
    pll_the_languages(array(‘show_flags’=>1,’show_names’=>0));
    ?>

    Everything works fine in static pages.

    In “posts” page (both the “main”, the one with the posts in chronological order and the single post), the title is at the same distance from the menu bar as the language buttons, the buttons appear as usual but .. don’t work at all!

    To place the posts content “after” the buttons, so they can work, how could I do? Should I work on index.php, home.php or content.php?

    Please help!!!

    Many thanks in advance!

    A.

    Thread Starter Anthyx

    (@anthyx)

    If this can help: if I change in style.css file the setting:

    .lang-switch {float:right;}

    to

    .lang-switch {float:left;}

    I get the buttons under the menu bar, on the left, working correctly, and the blog text starts just after the right button.
    There must be some kind of conflict between “layers” (sorry but I’m ney to wp and php).

    The answer would probably be to have those language buttons really “floating”, this way there are no conglich with the posts text.

    Hope with this I can add something.

    Thanks again.

    A.

    Thread Starter Anthyx

    (@anthyx)

    I did it!

    in Header.php I’ve just moved this code:

    <ul class=”lang-switch”><?php
    pll_the_languages(array(‘show_flags’=>1,’show_names’=>0));
    ?>

    BEFORE the last part of the .php code:

    <div id=”main”>

    … it work perfectly!

    Tnx a lot!

    A.

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

The topic ‘Posts Layout’ is closed to new replies.