WordPress.org

Ready to get started?Download WordPress

Forums

sidebar R/L, If statement & alternative page templates (4 posts)

  1. Tim Rowley
    Member
    Posted 1 year ago #

    Hi
    I'm making a site with Twenty Eleven and want to have the sidebar on the right for some pages and on the left for others. More specifically on the left for Arabic pages and on the right for English pages (I am using WPML). As I could not find control of this in the theme I started reading about creating additional page templates - it would be useful for me to change the logo image and the sidebar content per language as well now that I think about it. I've nearly understood what I have read in Codex and forums but it is still a little complex for and I don't have a clear picture of the steps. Can anyone help me here ?

    I guess it could be done by making a page template that can be selected in the 'Templates' dropdown of 'Page Attributes' when creating or editing a page.
    OR there could be an IF statement to pick up the url's with /ar/ for the arabic language.

    thanks to anyone who can answer this
    Tim

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    start by creating a child theme of Twenty Eleven;
    http://codex.wordpress.org/Child_Themes

    have a look here

    the suggested code should allow you to create page templates which will have the sidebar location independat from the theme layout options.

  3. Tim Rowley
    Member
    Posted 1 year ago #

    Thanks

    I followed the instructions in the article, which was brilliant. It works just as described, except ...

    I went to an Arabic page and applied the right-sidebar but it also changed the English page linkd to it.
    Also, with th ecurrrent structure, the home page containing th eblog was not selectable as a page and so has the default template, English and Arabic.
    If I added Arabic pages independently of their English translations the the Menu would not be synched (WPML).

    It looks like an if statement based on url: .../ar/ might be the simplest answer, but i'm not yet versed enough to write it.

    I definitely learnt something I'll apply to websites in the future but I still have problems with this English/Arabic site.

    Thanks
    Tim

  4. Tim Rowley
    Member
    Posted 1 year ago #

    Directed homepage to a static page called home, so that I could access it. I now have right sidebars for Arabic and left sidebars for English.
    Thanks Alchymyth

    I am still looking for the answer to hosting diffrent sidebar content for the two languages via an IF statement

    http://www.sudanunion.com

Topic Closed

This topic has been closed to new replies.

About this Topic