Title: How to insert code to php
Last modified: August 22, 2016

---

# How to insert code to php

 *  Resolved [Patryk](https://wordpress.org/support/users/patrykos360/)
 * (@patrykos360)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-insert-code-to-php/)
 * 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
 * > <?php
   > 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
 * [https://wordpress.org/plugins/simple-author-box/](https://wordpress.org/plugins/simple-author-box/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [tiguan](https://wordpress.org/support/users/tiguan/)
 * (@tiguan)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-insert-code-to-php/#post-5174171)
 * 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”
 * Best
 *  Thread Starter [Patryk](https://wordpress.org/support/users/patrykos360/)
 * (@patrykos360)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-insert-code-to-php/#post-5174183)
 * 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?
 *  [tiguan](https://wordpress.org/support/users/tiguan/)
 * (@tiguan)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-insert-code-to-php/#post-5174187)
 * 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](https://wordpress.org/support/users/patrykos360/)
 * (@patrykos360)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-insert-code-to-php/#post-5174202)
 * 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? 🙂
 *  [tiguan](https://wordpress.org/support/users/tiguan/)
 * (@tiguan)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-insert-code-to-php/#post-5174234)
 * 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.
 * Best
 *  [mazter3000](https://wordpress.org/support/users/mazter3000/)
 * (@mazter3000)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-insert-code-to-php/#post-5174324)
 * 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(); }?>
 * Thanks,
    AB
 *  [tiguan](https://wordpress.org/support/users/tiguan/)
 * (@tiguan)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-insert-code-to-php/#post-5174329)
 * Hi Patryk,
    I apologise for the issue and misunderstanding. Fixed! Best
 *  [tiguan](https://wordpress.org/support/users/tiguan/)
 * (@tiguan)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-insert-code-to-php/#post-5174330)
 * Hi [@mazter3000](https://wordpress.org/support/users/mazter3000/),
    Thanks for
   the bug report! Fixed! Best.
 *  Thread Starter [Patryk](https://wordpress.org/support/users/patrykos360/)
 * (@patrykos360)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-insert-code-to-php/#post-5174332)
 * It works now thanks!
 * Now i can rate the plugin 🙂
 *  [tiguan](https://wordpress.org/support/users/tiguan/)
 * (@tiguan)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-insert-code-to-php/#post-5174349)
 * 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.

 * ![](https://ps.w.org/simple-author-box/assets/icon-128x128.jpg?rev=1821054)
 * [Simple Author Box](https://wordpress.org/plugins/simple-author-box/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-author-box/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-author-box/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-author-box/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-author-box/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-author-box/reviews/)

 * 10 replies
 * 3 participants
 * Last reply from: [tiguan](https://wordpress.org/support/users/tiguan/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-insert-code-to-php/#post-5174349)
 * Status: resolved