Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #232875

    escapehour
    Participant

    Hi ,

    my site is http://www.escapehour.co.uk

    ive only ever been able to see the icons on a mobile device. now i want to add facebook and twitter to my nav bar.

    i have followed what i thought were the instructions and have the same problem as the other icons.. the link is there but no icons show.

    thanks for any help.

    steve

    #233071

    Christian
    Moderator

    Hey Steve,

    This is because of Access-Control-Allow-Origin. Please see http://enable-cors.org/ for more details about that.

    Thanks.

    #233596

    escapehour
    Participant

    sorry but i am not a programmer. I really dont understand what any of that means. If it is because of Access-Control-Allow-Origin. do I have to change some code or something? is there a setting to change? i am using x theme because i am not a programmer. i just dont understand why if a am using your short codes , the icons wont show. it seems pointless to me to have them if they wont work.

    #233725

    Darshana
    Moderator

    Hi there,

    My apologies foe the confusion. It means that your hosting provider doesn’t allow for cross origin (cross domain requests are disabled).

    Could you please try adding the following rule into your .htaccess file and see if that works for you.

    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>

    Alternatively, try adding the following code into your functions.php file.

    
    add_action ('init', function(){
     header("Access-Control-Allow-Origin: *");
    });
    

    Hope that helps.

    #233884

    escapehour
    Participant

    thanks, the first suggestion worked perfectly. im afraid that the original link to the website suggested will only make non programmers extremely confused. thanks again.

    #234089

    Zeshan
    Member

    You’re welcome! πŸ™‚

    #234123

    CarelP
    Participant

    I have tried both options but none seem to work for me πŸ™ Any more suggestions?

    #234304

    Zeshan
    Member

    Hi Carel,

    Thanks for writing in! I’ve just responded to your earlier reply on this thread: https://theme.co/x/member/forums/topic/social-icons-and-dropdown-arrows-not-working/#post-234107

    Hope that will help. πŸ™‚

    Thanks!

    #237919

    CarelP
    Participant

    Hi!

    I found out that in the console i too have this error: 2(index):1 Font from origin ‘http://url-a.com’ has been blocked from loading by Cross-Origin Resource Sharing policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://url-b.com’ is therefore not allowed access.

    I have a strange setup where the wordpress files are hosted on the hosting space of site A + WP-admin runs there but i view the site on site B. It does work on the contact page, because this one has the formatting of url-a.com/contact/ , so that one is on the original source domain.

    Thank you!

    #237924

    Paul R
    Moderator

    Hi,

    Regretfully, this particular issue is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your wordpress set-up. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

    Thank you for your understanding.

    #237930

    CarelP
    Participant

    I understand, but thankfully there is no more issue, i found the problem with your help! Thanks again.

    #237932

    Christopher
    Moderator

    You are welcome.