WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been struggling for a couple hours now to get this working... Hopefully someone here can help me.

I just started using the wp-footnotes plugin, and I'm trying to set the title attribute on backlinks to "Return to footnote # in the text." where # = the footnote number.

Below is what I tried, putting the $id_num variable in the title attribute, but it ends up just displaying as the number of footnotes that exist. You can see this at my development site on the first post.

Thank you so much in advance for any help.

It's quite a bit, so I'll paste the code in at the end:

    // Display identifiers      
    foreach ($identifiers as $key => $value) {
        $id_id = "identifier_".$key."_".$post->ID;
        $id_num = ($style == 'decimal') ? $value['use_footnote']+$start_number : $this->convert_num($value['use_footnote']+$start_number, $style, count($footnotes));

        $id_replace = $this->current_options['pre_identifier'].'<a href="'.$id_href.'" id="'.$id_id.'" title="'.$id_title.'">'.$id_num.'</a>'.$this->current_options['post_identifier'];
        if ($this->current_options['superscript']) $id_replace = '<sup>'.$id_replace.'</sup>';

    // Display footnotes
    if ($display) {
        $start = ($start_number != 1) ? 'start="'.$start_number.'" ' : '';

            if ($style == 'symbol') {
                $data = $data . '<span class="symbol">' . $this->convert_num($key+$start_number, $style, count($footnotes)) . '</span> ';
            $data = $data.$value['text'];
            if (!is_feed()){
                foreach($value['identifiers'] as $identifier){
                    $data = $data.$this->current_options['pre_backlink'].'
<a href="'.( ($use_full_link) ? get_permalink($post->ID) : '' ).'#identifier_'.$identifier.'_'.$post->ID.'" class="backlink"
title="Return to footnote '.$id_num.' in the text.">&#8617;</a>'

    return $data;
share|improve this question
Would be nice if you reduced the quantity of code to the bare minimum. – brasofilo Apr 3 '13 at 23:50
I edited it down a bit but I'm not 100% what is the bare minimum for this. – Austin Sweeney Apr 4 '13 at 0:19

I think you just need to replace this:

"Return to footnote '.$id_num.' in the text."

with this:

"Return to footnote '.$identifier.' in the text."

The $id_num is used in the "Display identifiers" loop, but what you want to edit is the "Display footnotes" loop.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.