Support » Plugin: Author Spotlight (Widget) » What if I don't want the authors box to show on pages?

  • Resolved dealfonso


    I write in a blog in which there are at least 15 authors. For that reason we installed this (awesome) plugin and we’re really pleased with it.
    Nevertheless, our blog has some pages in which we would prefer for an author not to appear (such as the “About us” or “Contact” pages).

    Is this possible?

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


    Well an easy way out is to use a different sidebar for such pages. If you want to edit the plugin you may want to edit line 107 of the plugin code and the change the line

    if(!$isHome && (is_single() || is_page()) && $authordata->ID){

    to something like:
    if(!$isHome && (is_single() || is_page()) && $authordata->ID && !is_page(array('About us','Contact'))){

    Ensure that you enter the correct page title in place of “About us” and “Contact”. This will make the widget disappear on these pages, additional pages may be added separating page titles with “comma”, as shown above.

    Note that the plugin doesn’t support this feature by default and I have not tested the above code. Do let me know if its works for you.

    Thanks for replying so quickly!

    We finally managed to do the same in a more “generic” way by deleting one piece of the code.

    if(!$isHome && (is_single() || is_page()) && $authordata->ID){

    if(!$isHome && (is_single()) && $authordata->ID){

    so the box won’t appear on pages, just on articles.

    Plugin Author Debashish


    Cool 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘What if I don't want the authors box to show on pages?’ is closed to new replies.