New Landing How can we help? Themeforest Theme Support Neighborhood PHP or Shortcode in the header

Viewing 15 posts - 1 through 15 (of 24 total)
  • #65212
    pstidsen
    Member
    Post count: 31

    I want to add a currency switcher to the front end as described here: http://wpml.org/documentation/related-projects/woocommerce-multilingual/multi-currency-support-woocommerce/#attachment_325266

    I think I want it here: http://i.gyazo.com/6ae1bcc46560c9b0c29f7e311624a3e2_1.png but where can I insert the PHP or shortcode? I have tried to insert the PHP at line 376 in wp-content/themes/neighborhood/includes/swift-framework/sf-content-display/sf-header.php but it doesn’t seem to effect the front end.

    Hope you can help me further.

    #65213
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi there,

    To add it there you would have to edit many files.

    Unfortunately that is not part of the current theme functionality, and it’s not within the scope of our support to be able to provide that functionality as it is more work than a small customisation. While we’d love to be able to support every customisation request, we simply don’t have the time. We recommend that you seek a freelance developer if you need that functionality, potentially from one of the below resources:

    https://codeable.io

    Home

    http://www.microlancer.com

    Hope that helps.

    – Kyle

    #65233
    pstidsen
    Member
    Post count: 31

    Can you tell me which files? I can a bit PHP so maybe I can figure out, if I know the files.

    #65255
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    I’m not entirely sure as I didn’t write the code for the theme, but my guess is sf-header.php and the style.css file. However there may be more

    – Kyle

    #70833
    patrickcb
    Member
    Post count: 35

    @pstidsen

    Did you manage to figure this out? I’m trying to add the exact same shortcode to my header but not sure how.

    #70966
    pstidsen
    Member
    Post count: 31

    I have inserted:

    <div class="currencyswitcher">
    	<?php echo do_shortcode('[currency_switcher]'); ?>
    </div>

    at line 209 in header.php

    The result is like this: http://i.gyazo.com/914b712a81ce1705ebf2e5a0b9222434_1.png

    #71017
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    You must have added it in the wrong place, you will need to look for the topbar code

    – Kyle

    #71024
    pstidsen
    Member
    Post count: 31

    I have tried and tried, but couldn’t figure it out.

    #71031
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Just noticed, that is the place you want it to be, correct? If so I could probably fix it with css to position it inline with the menu and search. If you could provide me with your link I will happily help you with the css for it

    – Kyle

    #71691
    pstidsen
    Member
    Post count: 31

    http://www.nagcollection.dk

    Ideally I want it next to (to the left) the language switcher.

    #71709
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    You need to move it. Open up sf-header.php and go to header 2, put the code inside:

    <div class="header-right span8">

    Then add this to your custom css:

    .header-right {
      position: relative;
    }
    .valutaskifter {
      margin-top: 6px;
      position: absolute;
      right: 70px;
      text-align: right;
    }

    – Kyle

    #71718
    pstidsen
    Member
    Post count: 31

    Doesn’t seem to work as expected. What’s wrong?

    #71720
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Do you have knowledge of php? Maybe you haven’t added the code correctly.

    – Kyle

    #71722
    pstidsen
    Member
    Post count: 31

    A bit.. I’ve added it like this:

    $header_output .= '<div class="header-right span8"><div class="valutaskifter">'.do_shortcode('[currency_switcher]').'</div>'.sf_aux_links('header-menu').'</div>'. "\n";

    #71728
    Melanie – SUPPORT
    Member
    Post count: 11032

    Can you show us your website so we can see what “not as expected” means and where we need to tinker?

Viewing 15 posts - 1 through 15 (of 24 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register