0

i have received a Fatal error from logs its repeating same error. I don,t understand what to do please help me out on this. Eroor logs:

PHP Fatal error: Call to a member function render_social_icons() on a non-object in content-single.php on line 190

Code :

<div class="fusion-sharing-box share-box"> 
<h4>
<?php echo __('Share This Story, Choose Your Platform!', 'Avada'); ?></h4> 
<?php 
echo $social_icons->render_social_icons( $sharingbox_soical_icon_options ); 
?>
Vasim Shaikh
  • 4,485
  • 2
  • 23
  • 52
Kuanl
  • 23
  • 5

2 Answers2

0

Create an object of class then use it in cotent-single.php file.Before that you have to include file for that specific class.

$social_icons= new <Some class>;
$social_icons->render_social_icons( $sharingbox_soical_icon_options );

You have to share cotent-single.php that will give more idea.

Vasim Shaikh
  • 4,485
  • 2
  • 23
  • 52
0

$social_icons isn't what you're expecting it to be.

You're treating $social_icons as an object when you try to call the render_social_icons() method and it's generating an error because it isn't one.

Where are you defining $social_icons? Was the code copied/pasted from elsewhere? Without seeing more code it's difficult to help devise a solution beyond suggesting that you trace it back and find out where $social_icons is being defined.

Nathan Dawson
  • 18,138
  • 3
  • 52
  • 58