Support

Account

Forum Replies Created

  • Hey John. Sorry for my bad explanations.

    Yes. The image is postetd directly inside the linktext, see the picture i loaded up. I tested your script. The result you can also see in the uploaded images. The crazy about is, that sometimes it’s working and sometimes not. But I don’t want to waste your time too much. Otherwise I’ll find another soultion. Maybe I can add an acf imagefield and call it directly inside the linktag. So ->a,img,linktext,/a<- That would probably make more sense too.

  • <?php if( $button_buy ): 
    	$button_buy_url = $button_buy['url'];
    	$button_buy_title = $button_buy['title'];
    	$button_buy_target = $button_buy['target'] ? $button_buy['target'] : '_self';
    ?>
    	<a class="button button-buy" href="<?php echo esc_url( $button_buy_url ); ?>" target="<?php echo esc_attr( $button_buy_target ); ?>"><?php echo strip_tags($button_buy_title); ?></a>
    <?php endif; ?>	

    Hey John, hope this helps. This ist the code from the template. I’m using normal img tag inside the Linktext. Can you see it in the picture i loaded up? I blacked out the URL for reasons.

  • hey John,

    thank your very much. This brought me some steps further. But I#m not the best PHP Developer so I don’t really know how to “merge” the export (PHP/JSON) into the existing fields coming with my theme. I really prefer JSON, but it’s not a must have.

    Maybe you have a CodeSnippet how I can realize this last step? If it’s not part of your services as a supportmember, maybe we can connect on a personal way and you tell me what i have to pay for your help?

  • It’s a little bit difficult to find out whre the problem is. Could you spend some code?

  • Ok, my fault. The solution is:

    <?php 
    	$singleproduct = get_field('products', $post->ID);
    	if( $singleproduct ): 
    ?>
  • Is this a DIVI question or an ACF question? I want to help but don’t really know what you mean.

  • In the last line of your code, at the beginning, there ist a “<” missing. Try:

    <?php 
    $mywysisyg = get_field('description_main');
    ( !empty( $mywysisyg ) ): ?>	
    	<div class="yourcontent">
    		<?php echo $mywysisyg; ?>
    	</div>
    <?php endif; ?>
  • ๐Ÿ™‚ That means you can write “whatever” you want.
    $mywysisyg oder $text or $kjdnehijd – it is just a variable.

    So, if you decide to unse maybe $text please change all “$whatever” in the code above.

    <?php 
    $text = get_field('fieldnameofyourwysisyg');
    ( !empty( $text ) ): ?>	
    	<div class="yourcontent">
    		<?php echo $text; ?>
    	</div>
    <?php endif; ?>
  • Try this code:

    <?php 
    $whatever = get_field('fieldnameofyourwysisyg');
    ( !empty( $whatever ) ): ?>	
    	<div class="yourcontent">
    		<?php echo $whatever; ?>
    	</div>
    <?php endif; ?>

    This Code only renders the Content and it’s container if there is code inside.

  • I don’t really know, but i had a similar problem but it’s long time ago. I couldn’t add Media Files, button not working. I remember that deep in my HTML/PHP code I missed a closing tag in the Footer (yes, the footer, the last thing on earth). Fixing it, solved the problem. Don’t know why, but it fixed it. Maybe you have something like that?

  • Do want to hide in the backend or frontend?

Viewing 11 posts - 1 through 11 (of 11 total)