liiam
Forum Replies Created
-
If you add a dropdown or checkbox it lets you filter by those choices. It is automatically filtering names just by you searching IE if you search “john” all johns would show.
This happened to me too and the way I resolved it was to manually add myself in the users table via phpmyadmin. If anyone else gets stuck with this its a pretty simple solution.
Forum: Hacks
In reply to: Call Custom Field inside shortcode or php within the templateTHANK YOU!
So I went with `function somthing() {
$priceinbutton = get_field(‘price’);
$iteminbutton = get_field(‘title’);echo print_wp_cart_button_for_product($iteminbutton, $priceinbutton );
}`it didnt work straight away but I realised that was my fault since I said the title was a custom field but it wasnt it was just the wordpress post title.
so I amended it to
$priceinbutton = get_field('price'); $iteminbutton = get_the_title();
and it worked like a dream!
Thanks so much
Forum: Hacks
In reply to: Call Custom Field inside shortcode or php within the templateHi
Thanks for your response. I have been playing around today and I discovered how to turn my custom field into a variable and then echo that variable on the page.That works ok.
What I am still struggling with is echoing / outputting / filling in the button specific php with the variable.
<?php echo print_wp_cart_button_for_product('I NEED VARIABLE HERE’, DIFFERENT ONE HERE); ?>
if I do
$priceinbutton = get_field('price'); $iteminbutton = get_field('title');
Then
echo $priceinbutton; echo $iteminbutton;
Outputs the value i.e. 50
What is the working version of this..
<?php echo print_wp_cart_button_for_product('echo $iteminbutton;’, echo $priceinbutton;); ?>
please?
Thanks Guys