Support » Plugin: Tabby Responsive Tabs » How to link to 2-line tab title?

  • Resolved OverYonderField

    (@overyonderfield)


    I wish to specify a tab I want to be open on page load. The tab title is 2 lines of text. The target method does not appear to work for two lines of text. I also tried adding the page id, but that didn’t help.

    – It does not matter if I use a return (in the text editor, not the visual editor) or a break code between lines of the tab title; neither works as a target to link to. I am using the dash between words in place of the return or break code in the target url.

    – If there is no text before the line return (i.e., a blank first line), the target works.

    BTW, there is a further problem with using both 2-line tab titles and 1-line titles in the same tab group — the single line tab background color does not fully fill in; it is necessary to create a 2nd blank line so that the single line tab title becomes a 2-line tab title as well.

    https://wordpress.org/plugins/tabby-responsive-tabs/

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

    (@numeeja)

    When the plugin was created, only single line titles were considered. It was not designed to specifically work with multiple line tab titles, so if they work at all, that is a bonus. I initially thought that there probably wouldn’t be a way to use the target parameter with line breaks in the tab title, but I reviewed the code for this functionality and did some tests and I think I have an answer for you that works:

    When using a line break: <br /> within the tab title you can use the target url parameter as described in the plugin’s documentation – converted to lower case with the spaces replaced with hyphens, however the value for the target will need to have the line break removed and not replaced with a hyphen or anything else.

    For example if your tab title is My Second<br/>Tabby Tab, your url to the page with that tab open would be something like:

    http://yoursite.com/yourpage/?target=my-secondtabby-tab

    You may be able to find a workaround for your second issue by using some custom css rules to fix the height of the tabs, however I’ve not looked into this. Making all of the tab titles the same height by adding a second blank line sounds like an appropriate workaround.

    Thread Starter OverYonderField

    (@overyonderfield)

    Yes, it worked! Thank you. With one modification added before the “?”:

    http://yoursite.com/yourpage/?target=my-secondtabby-tab

    Plugin Author cubecolour

    (@numeeja)

    I thought the slash before the query was optional as I’ve never had a problem omitting it, but I’ve edited my answer above to include it for the benefit of anyone finding this page in a search as it may be required for compatibility with all server setups.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to link to 2-line tab title?’ is closed to new replies.