I am trying to add this code to my head using the wp_head action,
But I get this error Fatal error: Can't use function return value in write context on line 130
line number 130 is onif ( !empty ( display_header_text() ) ) : ?>
Here is my code
<?php
129:function _display_header_text() {
130:if ( !empty ( display_header_text() ) ) : ?>
131:<style type="text/css" id="_display_header_text">
132: .mainHeader a img {
133: display:none;
134: }
135:</style>
136:<?php endif; }
137:add_action('wp_head','_display_header_text');
138:?>
139:
140:<?php
141:function _is_admin_bar_showing() {
142: if( is_admin_bar_showing() ):?>
143:<style type="text/css" id="_is_admin_bar_showing">
144: .fixedHeader {
145: top:32px;
146: }
147:</style>
148:<?php endif; }
149:add_action('wp_head','_is_admin_bar_showing');
150:?>
my this code works fine in localhost without any errors, but it sends an error on the real server.
any idea what is it? and how can i solve it?
user2579060
source
share