WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Anchor tag-links on Safari (3 posts)

  1. Kaiido
    Member
    Posted 2 years ago #

    Hi everyone,

    Due to a big tag-cloud in the header, I would like the links of this tagcloud point to an anchor on the page.
    I tried to modify the category-template

    $a[] = "<a href='$tag_link' class='tag-link-$tag_id' title='" . esc_attr( call_user_func( $topic_count_text_callback, $real_count ) ) . "' style='font-size: " .
    			( $smallest + ( ( $count - $min_count ) * $font_step ) )
    			. "$unit;'>$tag_name</a>";

    to

    $a[] = "<a href='$tag_link#MYANCHOR' class='tag-link-$tag_id' title='" . esc_attr( call_user_func( $topic_count_text_callback, $real_count ) ) . "' style='font-size: " .
    			( $smallest + ( ( $count - $min_count ) * $font_step ) )
    			. "$unit;'>$tag_name</a>";

    which do the trick for Firefox and Chrome.

    But Safari doesn't seem to like the "#" symbol in the URL.

    I tried to add 2 different vars to add "#" and "MYANCHOR", once again, ok for FF and Chrome but nothing with Safari...

    Then I found this topic which seemed to do the trick but now none of my other anchor links worked.

    So I finally come to you, hoping you'll have a solution.

    Thanks

    Ps: I don't talk Php ;-) so I could have missed some newbie thing.

  2. Kaiido
    Member
    Posted 2 years ago #

    Nobody there?
    I can notice that I'm using 3.3.1 and here is the link to the site
    I'm actually experiencing the issue with the automatic !more tags, but I can fix it doing the links manually.

  3. Kaiido
    Member
    Posted 2 years ago #

    Well I fixed it °‿°.
    So if anyone esle is experiencing the same issue, the solution was as dumb as I am ;-)

    I simply had to modify the "site URL" in "General Settings" of admin menu... Don't know why but it seems that Safari did a bad loop because of my wordpress site isn't in the source folder of my website ("http://mywebsite.org/" instead of "http://mywebsite.org/ABCDE/") and that he looses the # during these loops with server...

    Anyway, now it's ok and I'm happy ʶ‿ʶ

Topic Closed

This topic has been closed to new replies.

About this Topic