• Hello,

    I have a prob, map doesnt show up on my page

    Thats how i call the fields

    <div class="contact-service">
    <?php 
    
    $fields = get_field_objects(); ?>
    
    <?php if( $fields ): ?>
    	<ul>
    	<?php asort($fields);
    	foreach( $fields as $field ): ?>
    
    		<?php if( $field['value'] ): ?>
    					<?php the_leaflet_field( 'my_leaflet_field' ); ?> <? echo $field['my_leaflet_field']; ?>
    
    			<li><div style="float:left; position:absolute; left:60px"><?php echo $field['label']; ?></div> <?php echo $field['value']; ?></li>
    		<?php endif; ?>
    
    	<?php endforeach; ?>
    	</ul>
    <?php endif; ?>
    		</div>

    and thats the prob

    Catchable fatal error: Object of class stdClass could not be converted to string in C:\Users\Croesj\Documents\InstantWP_4.3.1\iwpserver\htdocs\wordpress\wp-content\themes\Lucid\Lucid\page-blog-contact.php on line 85

    The line 85 is the one starting with `
    <li><div style=”f”`

    [Code fixed by moderator]

    Thank you for yourtime ! ??
    https://www.ads-software.com/plugins/advanced-custom-fields-leaflet-field/

Viewing 1 replies (of 1 total)
  • Plugin Author jensnilsson

    (@jensnilsson)

    Hello Hammourabi!

    I think you’ve pasted in some code that messed up the styling of the support forum ??

    Judging by the code you pasted and the error-message I think you’re trying to echo out an object. Could you please try the above code again but remove or comment out the echo’s.

Viewing 1 replies (of 1 total)
  • The topic ‘Catchable fatal error: Object of class stdClass could not be converted to string’ is closed to new replies.