• Greetings,

    Currently display options has the following for single posts:

      Display the full text of the user’s biography
      Display the excerpt of the user’s biography

    Is there a way to remove the biography all together from single posts so that the box contains only the image, name and social link buttons?

    I’m using WP Biography 3.3.2 on a WordPress 3.8 installation.

    Regards,
    Volkan

    https://www.ads-software.com/plugins/wp-biographia/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author vicchi

    (@vicchi)

    Hi,

    There is a global control for the display of the user’s biography in the Biography Box under Settings / WP Biographia / Content / Show User’s Biography. But this will affect all instances of the Biography Box, not just those on single posts.

    If you’ve only configured the plugin for single posts and not for any other post type this should work fine for you.

    But if not, then the plugin doesn’t support per post type customisations of this sort. You may be able to work around this using the plugin’s filters and writing some PHP to amend the Biography Box content though.

    -Gary

    Thread Starter volkanbg

    (@volkanbg)

    Thanks Gary for the quick response.

    I am aware of the global setting but I also use the boxes for the author’s pages and ‘all authors’ page.

    Before posting this question I spent quite some time within wp-biographia.php but was a bit lost most of the time. It’s a well documented piece of code but still too convoluted for me to figure out at a glance. Any pointers would be much appreciated if it’s not too much trouble.

    Plugin Author vicchi

    (@vicchi)

    You shouldn’t need to hack the plugin’s PHP or read it (unless you really want to).

    My thinking here is that you hook into the wp_biographia_biography_box filter (see https://www.vicchi.org/codeage/wp-biographia/5-filter-support-and-usage/) and check whether this is a single post via the is_single() API call. If this returns true you can then remove the paragraphs within the wp-biographia-text div to remove the biography text. Alternatively you can hook into the wp_print_styles action hook and load some custom CSS if this is a single post to set the CSS for wp-biographia-text.p to hidden.

    It’ll need some knowledge of PHP and CSS and how WordPress queues action and filter hooks though; I’ve no idea how much knowledge you have of this. If the answer is “none” I can try and hack together some sample code which should work for you.

    -Gary

    Thread Starter volkanbg

    (@volkanbg)

    I can work my way around PHP and CSS but I’m not familiar with WordPress hooks or filters. “none” is a better way to put it perhaps.

    Plugin Author vicchi

    (@vicchi)

    In that case I’ll try and hack a sample together for you over the next couple of days.

    -Gary

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to remove biography from biography box?’ is closed to new replies.