• Resolved user199

    (@user199)


    Hello,
    I’d like to have specific tab open when calling the site via link. The tab title contains the german “ü”. I tried ü, ue, ü, u but non worked and can’t figure out what to write in the address line to make it work.
    If anybody can help, it’s very appreciated.
    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author cubecolour

    (@numeeja)

    It *should* work with ü replaced with u as the remove_accents function is used on the tab title before the comparison is made.

    Please post a link to the page on your site that contains the tabs with special characters in the title

    Thread Starter user199

    (@user199)

    Plugin Author cubecolour

    (@numeeja)

    I’m not sure why this is not working for you as there does not seem to be any problem targeting a tab with the same title on my test site:

    http://michaelatkins.co.uk/tabby-umlaut-test/?target=fruhstuck

    We might be able to get some clues about the issue if you can install the simple troubleshooting plugin I made to investigate this:

    
    <?php
    /*
    Plugin Name: Accent Strippage
    Description: Troubleshoot the accent removal function
    Author: cubecolour
    Version: 1.0.0
    Author URI: http://cubecolour.co.uk/
    Date: 20 January 2017
    */
    
    if ( ! defined( 'ABSPATH' ) ) exit;
    
    /**
     * Show what is returned when accents are stripped and sanitized to title format
     * usage: [noaccents]content[/noaccents]
     *
     */
    function cc_accent_strippage( $atts, $content = null ) {
    
    	$output = '<div style="background:#e6e6e6;padding:16px">';
    	$output .= '<h2>Troubleshoot Stripped accents</h2>';
    	$output .= '<p><strong>Original content:</strong> ' . $content . '</p>';
    	$output .= '<p><strong>Accent stripped:</strong> ' . sanitize_title_with_dashes( remove_accents( wp_kses_decode_entities( $content ) ) ) . '</p>';
    	$output .= '</div>';
    
    	return $output;
    }
    
    add_shortcode('noaccents', 'cc_accent_strippage');
    

    Then add a shortcode to your content using exactly the same text for the shortcode content as was used on your tab title

    eg:
    [noaccents]Frühstück[/noaccents]

    • This reply was modified 9 years, 2 months ago by cubecolour.
    • This reply was modified 9 years, 2 months ago by cubecolour. Reason: typo
    Thread Starter user199

    (@user199)

    Thank you very very much. That helped! There were two problems:
    First I wrote “&uuml ;” instead of “ü” for testing purposes but I didn’t change it back.
    Second is that only in german, all other languages work as you said, ü is changed to “ue” instead of “u”, as you can see on my site (I leave your php code there for some time if you want to check it out).
    Anyway thank you very much for your help!

    Plugin Author cubecolour

    (@numeeja)

    Aha! Yes – I can see that using a URL parameter/value of ?target=fruehstueck to target that tab seems to be working on your page.

    It is interesting to learn that WordPress’s remove_accents() function would change the ü to ue for the German language, so I will add a note to the plugin’s FAQ.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Link containig “ö, ä, ü”’ is closed to new replies.