Forum Replies Created

Viewing 15 replies - 136 through 150 (of 151 total)
  • Thread Starter Anthyx

    (@anthyx)

    Thanks Chouby for your help,

    I have solved the problem just “moving up” a bit the code:

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

    inside my header.php file.

    Now the flag buttons work properly into the posts too.

    Many thanks anyway!

    A.

    Forum: Fixing WordPress
    In reply to: Posts Layout
    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.

    Forum: Fixing WordPress
    In reply to: Posts Layout
    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.

    Forum: Fixing WordPress
    In reply to: Posts Layout
    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)

    Thanks Chouby,

    I’ve tried placing:

    #access li.lang-item {
    float: right;
    }

    in my child theme style.css file, but the only result is a “switch” of the two flags I use: now the italian one is on the right, the english one on the left.

    Add the fact that the flags on the bottom menu are correctly alligned to the menu text, those on the upper menu are stick to the top limit of the menu.

    If you have any idea how to solve this I would really appreciate. I will continue to look in the forum and docs anyway.

    Many thanks

    A.

    Thread Starter Anthyx

    (@anthyx)

    Closing the thread as solved. Thanks again.

    Thread Starter Anthyx

    (@anthyx)

    Ok, problem solved:
    to make the other langage(s) appear, just create one post in that particular language.

    Many thanks anyway.

    Ciao

    A.

    Thread Starter Anthyx

    (@anthyx)

    FOUND! … I put “or” instead od “&&” and it works!

    Many many thanks again for your help Matt!

    A.

    Thread Starter Anthyx

    (@anthyx)

    Nope, it does not work … if I put both of them, linked by “&&”, the slider does not work.
    It works just using “is_home()” OR “is_front_page()”. Strange … any idea?

    Thread Starter Anthyx

    (@anthyx)

    Yes, it works: now the static “Home” displays the slider, the blog page (aka the “real” home”) does not. Do you think is possible to add both “is_home()” and “is_front_page()” to the code? (leaving, of course, the featured image to all other pages and posts).

    Thread Starter Anthyx

    (@anthyx)

    Excuse me Matthew,

    using the “Reading” submenu of “Settings” in Twentyeleven, I have set a normal page (called “Home”) as the main, static page.
    I have created another static page, calling it “blog”, and using the “Reading” menu I have set it as the post page.

    Now the slider points to “Blog”, probably because it’s the old, let’s say “main post page”. The new static main page (called by me “Home”) has no slider.

    Is it possible to redirect the slider both to the post page and the new static home page?

    The code is:
    _______
    if ( is_home() ) {
    if ( function_exists( ‘easingsliderlite’ ) ) {
    easingsliderlite();}
    }
    else if ( $header_image ) :
    // Compatibility with versions of WordPress prior to 3.4.
    if ( function_exists( ‘get_custom_header’ ) ) {
    _______

    I suppose it’s just a question to add another “if” variable, but which? How?
    I suppose that “home” in the code is right now most probably the real name of the “Blog” static page I created, and that’s fine.
    How can I “redirect” the slider also to the “static” home paga called “Home” I just created?

    Many thanks in advance for your patience.

    A.

    Thread Starter Anthyx

    (@anthyx)

    Fixed a little typo (“:” instead of “{“) … it works perfectly!

    Since I found that other people is interested in the topic, here is the code to be inserted in the default header.php:

    $header_image = get_header_image();
    if ( is_home() ) {
    if ( function_exists( ‘easingsliderlite’ ) ) {
    easingsliderlite();}
    }
    else if ( $header_image ) :
    // Compatibility with versions of WordPress prior to 3.4.
    if ( function_exists( ‘get_custom_header’ ) ) {

    Many many thanks for your help Matthew!

    Ciao

    A.

    Thread Starter Anthyx

    (@anthyx)

    Thread Starter Anthyx

    (@anthyx)

    I don’t know PHP at all, just trying to figure how it works: as you said the correct code should be:

    <?php
    if ( is_home() ) {
    if ( function_exists( “easingsliderlite” ) ) {
    easingsliderlite();}
    }
    else
    ?>
    <?php

    At this point I’m just getting crazy to find the right code.
    Again, please help!
    (I promise, I’ll study PHP soon!) ??

    Thread Starter Anthyx

    (@anthyx)

    I see, yes it works perfectly.
    Many thanks!

    A.

Viewing 15 replies - 136 through 150 (of 151 total)