Home Forums Pure Theme Discussion & Support Icons / Images under the search box

This topic is: resolved

This topic contains 6 replies, has 2 voices, and was last updated by  Nick Truscott 4 years, 7 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2571

    Nick Truscott
    Participant
    Post count: 67

    My client would like to add one or two important icons/images/links either before or after the search box on the main left side of the template (in all pages) to make themm prominent.

    Please advise how I could do this (rememberign of course I am not a PHP person LOLOL).

    Thanks.

    Nick

    #2573

    themeweaver
    Keymaster
    Post count: 730

    Well, again remember the responsive side to the theme. Where do you want these icons and links to go when the browser is smaller?

    #2574

    Nick Truscott
    Participant
    Post count: 67

    Yep, I get that and they are not going to be huge – in responsive mode they would sit under the search box

    #2577

    themeweaver
    Keymaster
    Post count: 730

    Probably a couple of ways to so this, but you will need some PHP!

    Either:

    1. In a child theme copy the header.php file from main theme folder and modify content inside header tag.

    OR
    2. In a child theme use a hook that is already present in the header.php file. Use something like the following in a child theme functions.php:

    
    add_action( 'livingos_abovemain', 'myextracode');
    
    function myextracode() {
       echo '<div id="myicons">...</div>';
    }
    
    

    This inserts content between header and main, so you can then use css to place wherever you like. But you will need some media queries to make it responsive.

    Then add some css to put myicons wherever you want them.

    Option 2 is the smart way since you are not touching parent theme code (better for updates), but it is more complicated and the responsive nature of the theme does make things tricky for both options, since this is the part of the theme that gets shifted around the most!

    Putting the icons anywhere else in the theme would be a doddle. I realise that space under the search box looks inviting but it moves. Also on a mobile device everything is one column so anything you put here shifts your real content further down.

    #2586

    Nick Truscott
    Participant
    Post count: 67

    Thanks – far too complex for me to fiddle around with, guaranteed I will mess it up and end up having to start from scratch. The adaptive issues don’t bother me – simply the techie aspects of messing with the PHP files. If they really want to do it I guess they can ask you for a quote to do it? Yes?

    Fear of failure crosses many, many boundaries! Appreciate you taking the time to advise me though.

    Nick

    #2589

    themeweaver
    Keymaster
    Post count: 730

    OK. Happy to quote if help needed.

    #2590

    Nick Truscott
    Participant
    Post count: 67

    Thanks Tim

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

You must be logged in to reply to this topic.