Marcelismus on "[Plugin: WP-Appbox] how to show app badge in theme with help of acf."

ساخت وبلاگ

suraj jadhav
Member
Posted 5 months ago #

I understand it's working.
Simple for admins, advanced for user.
but I want little advance editing.
ok so I can show badge into content area with the shortcode like
[AppBox * Store Name * screenshots * id *].
but I want to show it in a specific part of a theme in my child theme.
it can be done by
<?php echo do_shortcode("[AppBox * Store Name * screenshots * id *]"); ?>.
but I am want add *id* from advanced custom field.
means I don't want to add badge form visual editor but from custom field.
I created ACF/custom field 'android' for android app Id.

I tried something like this.
<?php echo do_shortcode("[AppBox playstore screenshots <?php the_field('android'); ?>]"); ?>

and

<?php echo do_shortcode("[AppBox playstore screenshots [acf field="{$field_name}"]]"); ?>

but seems It's not working.

any clue or trick to get work done.

https://wordpress.org/plugins/wp-appbox/

do_shortcode() within the theme works, I tried it.

But I don't know about custom fields and so on. Just two ideas:

- It is "appbox", not "AppBox". The second one didn't work for me, too.

- Does [acf field="{$field_name}"]] retus the correct ID? Don't know. ;)

suraj jadhav
Member
Posted 6 hours ago #

1. Create desired custom fields
2. assign It's value to a variable.
3. Use variable in wp-appbox shortcode

Replace AppBox with appbox. do_shortcode should works, try in templates.

- - , .
.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 311 تاريخ : يکشنبه 27 تير 1395 ساعت: 6:20