Support » Theme: Bluestreet » Use fb or twitter protocol in social links

  • tpothuizen

    (@tpothuizen)


    Hi,

    I have an issue using social media links in the header.
    I want to add urls to targets that support app-navigation, not only http.
    Examples:
    – target: fb://profile/227565574598597/

    Similar examples exist for Twitter a.s.o.
    Use case is for mobile devices, where several apps can be installed. When an app is not installed, the browser should forward navigate to the http-url.

    In the header.php of the wallstreet theme I notice that esc_url is used. This does not support protocols like fb:// and twitter://
    However, when I remove this, the social media icon is still hidden.

    Hope to hear from you soon, best regards, Toine

Viewing 6 replies - 1 through 6 (of 6 total)
  • Amit Gupta

    (@gamit6444)

    Hi, tpothuizen

    This URL pattern is not working. But it is possible in another way. You can use this URL there:
    https://www.facebook.com/BB-Oud-Zilven-Loenen-227565574598597/

    And with the help of this, you can target the same page you want.

    Thanks

    • This reply was modified 2 years ago by Amit Gupta.
    Thread Starter tpothuizen

    (@tpothuizen)

    Hi,

    this is not a solution for my use case. The http link is not calling the facebook app, but stays in the browser. And in case you don’t have a password set in your browser for facebook, you even can get a login dialog.

    There should be a nicer solution, though?

    Regards, Toine

    Amit Gupta

    (@gamit6444)

    Hi,

    In the customization, an option is not given to put URL like fb://profile/227565574598597/
    There is a solution to use this URL by using JS code.

    Please follow the below steps:

    1. Copy and Paste the header.php file from Wallstreet theme folder to Bluestreet theme folder.
    2. Open the file and add id. Refer to this screenshot.
    3. Save the file.

    Note: Do the same in the footer.php file of Bluestreet theme folder.

    After this, install and activate the code snippets plugin. Add new snippet and paste this code.

    Let me know if you have any confusion!

    Thanks

    • This reply was modified 2 years ago by Amit Gupta.
    Thread Starter tpothuizen

    (@tpothuizen)

    Hi,

    thanks for your effort so far. Solution looks okay. But still some questions:
    – how can I add (copy) a php page to my (Bluestreet) theme? I’m not using a php developer tool, but a hosted wordpress environment. In the theme editor I cannot see an option to add a file.
    – in case of Bluestreet theme updates, do I have to repeat some of these steps? Or do I better use a new custom theme (derived from Bluestreet)?

    Best regards, Toine

    Thread Starter tpothuizen

    (@tpothuizen)

    It took some time to find a typo in your code:
    There was a loose ‘b’ behind the comment at the header. ( /* For Header Social Icons */ )
    And I assigned the action to wp_head, not to wp_footer, as I’m using the header.
    Regards, Toine

    Amit Gupta

    (@gamit6444)

    Hi,

    To add a PHP page, use any text editor and create a new file and save with .php extension for ex- sample.php. And then add this file in your Bluestreet theme folder.
    If you want to use additional features from Blustreet theme then you can try using our Wallstreet theme.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Use fb or twitter protocol in social links’ is closed to new replies.