• Resolved mskimberly

    (@mskimberly)


    Hi, I am using the most recent Tablepress, 0.8.1.

    I would like to link from one part of the site directly to the table. So, I have “popular requests” in the side bar (i.e. Mammoth to Las Vegas) that I would like to link directly to the rate table corresponding to that request. I have tried a few different things but while they all get me to the Rate page, they do not get me to the desired rate table. Is this possible? https://originalmammothshuttle.com

    Things I have tried:

    1. In the Rate page, I have added the anchor tag like so:

    <a name="#lasvegas"><div class="tablepress-wrapper">
    
    [table id=3 /]
    
    </div>
    </a>

    This made the whole table look like a link, but alas, clicking on the link in the sidebar did not actually take me to the table.

    2. In the Rate page, I added the anchor tag a little differently:

    <div class="tablepress-wrapper">
    <a name="#lasvegas">
    [table id=3 /]
    </a>
    </div>

    This also made the whole table look like a link, but also moved the table down about 15pixels or so. Again, the sidebar link did not recognize the anchor.

    3. I went into Tablepress and added the anchor tag to the table name.

    So, under Table Information, in the Table Name I put:

    <a name="#lasvegas">Mammoth to Las Vegas</a>

    This made the table name look like a link AND moved the table down about 15 pixels or so. Sidebar link did not recognize the anchor.

    https://www.ads-software.com/extend/plugins/tablepress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    you are almost there. ??
    The links are not picked up due to the # in the “name”. That # must only be used in the link that should point to the table.
    Instead of an <a name="...">, you should use a self-closing <span id="..." /> element. That doesn’t have the drawbacks you mentioned. The idea to put that into the table name is very good for this.

    So, please try adding <span id="lasvegas" /> to the beginning of the table name field.

    Your link in the the sidebar should then pick this up. Additionally, you should add another / to the URL in the sidebar links, i.e. link to

    https://originalmammothshuttle.com/rates/#lasvegas

    Regards,
    Tobias

    Thread Starter mskimberly

    (@mskimberly)

    Wonderful! Thank you SO much! That worked perfectly.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    great ?? Thanks for the confirmation that this did it! ??

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding anchor to table names’ is closed to new replies.