I am using this code but getting a 500 error on the IF
part. Not sure why this happens.
$instac = get_the_author_meta( 'au-instagram', $current_author->ID );
if (!empty($instac)) {
return '<a href="' . $instac . '" class="kalim">instagram</a>'
}
I am using this code but getting a 500 error on the IF
part. Not sure why this happens.
$instac = get_the_author_meta( 'au-instagram', $current_author->ID );
if (!empty($instac)) {
return '<a href="' . $instac . '" class="kalim">instagram</a>'
}
Share
Improve this question
edited Jul 27, 2019 at 20:21
nmr
4,5672 gold badges17 silver badges25 bronze badges
asked Jul 27, 2019 at 20:13
JoaMikaJoaMika
6986 gold badges27 silver badges58 bronze badges
1
|
1 Answer
Reset to default 0500 error or internal server error is probably caused by a PHP error. By enabling WordPress debug, you’ll easily find where the problem is. You can follow the instructions here https://wordpress/support/article/debugging-in-wordpress/#wp_debug_log
From your code, it’s easy, you’re missing a semi-column before the closing curly bracket.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745288920a4620736.html
instagram</a>'
. – Jacob Peattie Commented Jul 28, 2019 at 4:16