How to insert this php code via Function or PHP code actions

Help! What is the correct way of inserting this via Function / PHP code actions:

<?php if (!empty($url)) {?>><?php }?>

i understand that it should not contain <?php> tags, but what parts to remove? :sweat_smile:

if i put it manually, it will be overwritten on next export

thank you very much

i saw that my question was jumped over :slight_smile: sorry if i asked wrong or basic question…i’m new and i could really use some help. pinegrow looks great, and i want to move from webflow, but i also want to be sure that is right tool for me :slight_smile:

if it is not possible via PHP Code & Functions is there any other way to put this code (except writing it directly to file and overwiting on every export)

if i strip php tags i get something like this this:

if (!empty($url)) { > }

and of course it doesn’t work after export. What am I doing wrong?

please and thank you :slight_smile:

Come on, it’s summer, the :sun_with_face: is shining and rest assured that your message has not been purposely ignored.

If this is a condition you wish to integrate, there is an action for this:

1 Like

Hey Emmanuel, thank you very much :slight_smile: actually it’s raining here, so finally we can rest from the heat a little. Another thing popup, seems like there is no option for meta_query in The Loop:

‘meta_query’ => array {
}

Is there any workaround or i need to put it manually after every export?
:slight_smile: cheers and thank you again.

@fogseller to do that without having to manually edit after export:

#1 Use The Loop action (not Show Posts) and select “Args in own PHP block”.

This adds a PHP block where the query args are defined. PG changes this code whenever you change the The Loop action settings.

#2 To customize parameters, add your own PHP block AFTER the PHP block with query args and modify the args there.

Enjoy the rain! :slight_smile:

1 Like

@matjaz worked like a charm! Thank you so so much! Pinegrow is BRILLIANT. B R I L L I A N T!!! WOOOOW! so happy, as you can tell… :grinning:

2 Likes