Author Spotlight (Widget)
[resolved] What if I don't want the authors box to show on pages? (4 posts)

  1. dealfonso
    Posted 2 years ago #

    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?


  2. Debashish
    Plugin Author

    Posted 2 years ago #

    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.

  3. dealfonso
    Posted 2 years ago #

    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.

  4. Debashish
    Plugin Author

    Posted 2 years ago #

    Cool :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Author Spotlight (Widget)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.