I solve it with the custom fields, calling the post meta
<?php echo get_post_meta($post->ID, “artist”, true); ?>
Thread Starter
lahoti
(@lahoti)
Ya but what if I have product variation? How to enter for each product variation
I put them all with different psot-meta in my short description.
An in each product, when I need to show this info I put the value in the custom file, if there is no value it will not show.
Of course I have several values that apply to many item, like: author, date, year, origen, etc.
Thread Starter
lahoti
(@lahoti)
but all product variation have the same code to display.. so how will i display custom field corresponding to Product variation A-1; and when it is A-2 show field corresponding to it
<?php echo get_post_meta($post->ID, “A1”, true); ?>
<?php echo get_post_meta($post->ID, “A2”, true); ?>
<?php echo get_post_meta($post->ID, “A3”, true); ?>
<?php echo get_post_meta($post->ID, “A4”, true); ?>
and go on.
Thread Starter
lahoti
(@lahoti)
no its not that simple (i thought i might do it buikding upon what you suggested)-
I tried following
– created custom field A_post_ID_for variation
– WHen webpage is loaded php runs once using ID of parent post
— hence, when i change variation it doesnt help
– tried to look at how price is changing and it seemed will have to modify too much php code in WC_product class..