connecting more variables
-
At the moment I have a specific field for each agency (author) to define price of final cleaning. This price sometimes is different from apartment to apartment (from post to post). So What I want to do is keeping printing “final cleaning” at author level, but to these 2 words I want to add the price of final cleaning in euro using a selector in the post editor (custom number meta box)
The function for the final cleaning is
$pulizia_esc = get_the_author_meta( 'pulizia_esc', $post->post_author ); if ( ! empty( $pulizia_esc)) { $pulizia_esc = '<div class="pulizia_esc">'. $pulizia_esc .'</div>'; }
Is it possible to add the value of the meta key I will use for the amount of final cleaning (i.e: amount_cleaning) and add it in the function?
$pulizia_esc
will be no longer only= get_the_author_meta( 'pulizia_esc', $post->post_author );
but we have to add ideally (‘amount_cleaning’, and here define the place of the meta data,I suppose, maybe just $post )
if it were a simple addition I would write:
$pulizia_esc
+amount_cleaning €€ is a postfix
This is where I go to operate in each post (in red): https://ibb.co/7xhBHpB
The page I need help with: [log in to see the link]
- The topic ‘connecting more variables’ is closed to new replies.