Support » Plugin: Simple Author Box » How to insert code to php

  • Resolved Patryk


    Hi šŸ™‚ I have a problem coding nature,
    How do I have to modify this code

    <?php if ( function_exists( ‘sabox_author_box’ ) ) echo sabox_author_box(); ?>

    to add to the already existing php code


    Here is my post single code


    i need to ad there this code but when i add then stops working my page šŸ™‚

    i try to add

    if ( function_exists( ‘sabox_author_box’ ) ) echo sabox_author_box();

    but then the box does not appear

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi,

    To add the author box function in your existing php code, you should enter the code without opening and closing php tags as follow:

    if ( function_exists( 'sabox_author_box' ) ) echo sabox_author_box();

    Then make sure you have activated the first plugin option: “Manually insert the Simple Author Box”


    Thread Starter Patryk


    I checked if the display outside the php code

    <?php if ( function_exists( ‘sabox_author_box’ ) ) echo sabox_author_box(); ?>

    and does not appear as if the code does not react

    i have on

    Manually insert the Simple Author Box

    when I set automatically insert then show up, but not where I wanted to
    is maybe some sort of another command to call up box?

    May be something wrong with the way you include this code or with the place where you include it. For example, the code may be wrapped by another conditional code, etc …

    Thread Starter Patryk


    My current code author box looks this:

    #post info
    if(!$disable_postinfo) {
    do_action(‘it_before_postinfo’, it_get_setting(‘ad_postinfo_before’), ‘before-postinfo’);
    echo it_get_post_info(get_the_ID());
    do_action(‘it_after_postinfo’, it_get_setting(‘ad_postinfo_after’), ‘after-postinfo’);

    Is this something will you help? šŸ™‚

    There is no SAB funtion in your code. I guess you should enter the SAB code without opening and closing php tags after the last curly brace “}
    I’m not sure since I do not know how’s the rest of your code.

    Look, I wanted to help but learning some basic conditional here is beyond the scope of this forum.


    Hi Tiguan,

    This code snippet you provided from the option page is wrong:
    <?php if ( function_exists( ‘sabox_author_box’ ) ) echo sabox_author_box(); ?>

    And this is the correct one:
    <?php if ( function_exists( ‘wpsabox_author_box’ ) ){ echo wpsabox_author_box(); }?>

    Hi Patryk, try this: <?php if ( function_exists( ‘wpsabox_author_box’ ) ){ echo wpsabox_author_box(); }?>


    Hi Patryk,
    I apologise for the issue and misunderstanding. Fixed!

    Hi @mazter3000,
    Thanks for the bug report! Fixed!

    Thread Starter Patryk


    It works now thanks!

    Now i can rate the plugin šŸ™‚

    Thanks for your rating!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to insert code to php’ is closed to new replies.