I'm working on a wordpress based website doing a custom theme and I'm trying to display certain content via custom fields and I'm having a little trouble with getting the content to work properly I'm looking for someone that over skype you must be able to voice chat via skype so we can go over the details of the code. It's actually a pretty short php code that I need an overview of what I"m trying to do is below.
I'm using wordpress and in my post I'm looping a series of custom fields which will output a number.
<?php echo get_post_meta ($card_id, 'card-cost', true); ?>
This will then output the numbers from the custom fields so for example lets say the post has 8 of these fields the numbers will show
2 2 3 4 2 5 5 3
What I need is to grab all the same numbers and add them together and set them to a variable
so for 2s we have 3 set so I I would assume something like this
$total2 = 2+2+2
$total3 = 3+3
$total4 = 4
$total5 = 5
The first thing I'm not sure about is how to execute the loop inside php so instead of printing the above numbers we can store them in php to than add them together.
Once we have them how do we have php pick out just the 2's to add together than just the 3s.
Pretty much I need someone who can write an array to make this all work, but it's very important that you can communicate via voice chat via skype so I can go over how things are setup.
The main skills needed are you must have a very good knowledge of PHP and wordpress than knowledge of the wordpress plugin Advanced custom fields plugin would be helpful as that is used to pull the custom fields.