snehabarve on "[Plugin: AddToAny Share Buttons] showing social buttons after ACF get_field function also"

ساخت وبلاگ

snehabarve
Member
Posted 1 week ago #

I am having very strange problem.
I want social buttons to be display only before content of custom posts single page but in my case it is displaying after get_field() function of ACF...
How should I remove extra set of social buttons from my single custom post page.
Any help would be appreciated.

https://wordpress.org/plugins/add-to-any/

Wasn't able to reproduce the issue with a basic ACF field. How is your ACF setup exactly (Field Type, etc.), and where/how are you using get_field()?

snehabarve
Member
Posted 21 hours ago #

ACF field type for both fields are text.
As shown in screenshot...
https://gyazo.com/9d55630b78afe314cbc59bcf0e42af2a

and it is showing addtoany share bar like below...
https://gyazo.com/bbecf52e990c2a8cf1887301fcb94106

I have used get_field(); to fetch these fields.

also it is saving it with this field in backend as below
https://gyazo.com/f6ed41b8faf5f22869657b77edad4791

Your backend ACF issue is really odd and not reproducible with:

  1. A basic ACF Text field registered through the GUI, and
  2. default AddToAny settings (with button placement at 'the top of posts' as you have it).

The HTML code oddly appearing in your Text field's value is the code that AddToAny inserts into the_content and the_excerpt. Try ACF's support if you're unsure why ACF is picking that up.

snehabarve
Member
Posted 13 minutes ago #

Okay thanks... For now I am using get_post_meta() to fetch ACF values and it is working for now...

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

برچسب : نویسنده : استخدام کار wpss بازدید : 289 تاريخ : چهارشنبه 2 تير 1395 ساعت: 14:21