Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #424124

    I want to make 4 different designs for the header and footer – different logos and different background color for the footer.
    How do I do this?

    #424125

    Hi sasha!

    Can you please post a screenshot showing the changes you would like to make and link to your website please?

    Cheers!
    Yigit

    #424133

    Hi,

    Thanks for the fast reply.

    I don’t have a screenshot but the idea is to have 4 pages that each of them has a different logo and a different background for the footer.

    For ex.: a page with logo1 with red footer, a page with logo2 with blue footer…

    #424137

    Hi!

    Please add following code to Quick CSS in Enfold theme options under General Styling tab

    .page-id-59 #footer {
      background-color: orange;
    }
    .page-id-55 #footer {
      background-color: red;
    }

    You need to change page ID’s to target each page. You can right click on Chrome or Firefox to inspect elements to find page ID’s http://i.imgur.com/HyPTCRg.jpg

    And to display different logos, please add following code to Functions.php file in Appearance > Editor

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo)
    {
        if(is_page(59) )
        {
        $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png";
        }
        return $logo;
    }

    Cheers!
    Yigit

    #424382

    Works great!!!

    2 more questions on this:
    1. What if I added a widget area to the header and I want to change it’s color on different pages?
    2. Is there a way to make it easy to duplicate the design to other pages without needing to add the page id each time?

    Thanks

    #424717

    Hi!

    1- Can you please post the link to your website so we can provide you an accurate custom CSS code?
    2- You are going to need to adjust the page ID or add inline CSS to your page. Adding page ID sounds simpler to me :)

    Cheers!
    Yigit

    #430468

    Hi,

    The id solution works fine but if I want to make many pages of each color – adding IDs seems not so right. Is there a way to make a 4 different templates – a template for each color which switches the header and footer?

    #430485

    Hi!

    You can apply to multiple pages by changing following line

    if(is_page(59) )

    to following

    if(is_page( array(59,3548,4176,4306,3546 ) ))

    If you would like to create a new template, please see – https://codex.wordpress.org/Page_Templates

    Regards,
    Yigit

    #430770

    What would be the right way to write the css for many pages?

    Instead of

    .page-id-59 #footer {
    background-color: orange;
    }
    .page-id-55 #footer {
    background-color: red;
    }

    #430778

    only this works:
    if(is_page(59) )

    when I try this for many pages:

    if(is_page( array(59,3548,4176,4306,3546 ) ))

    It doesn’t work – any idea why and how to solve this?

    #430780

    ignore the last comment – It works after deleting the spaces…

    #430782

    All works great. Many thanks.

    #431176

    Hey!

    Great, glad you got it worked out :)

    Best regards,
    Rikard

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.