You need to be using get_sub_field()
, not the_sub_field()
to set $company
. the_sub_field()
has no return, it just echo
s the value, whereas get_sub_field()
returns the value (but does not echo it).
Related Posts:
- Get page permalink without wpurl
- Can I use REST-API on plain permalink format?
- Creating custom permalink structure for languages
- How to change ‘with_front” key from an existing custom post type?
- Permalink not working for page without title
- Post titles not letting me use 2 consecutive dashes in permalink
- Using underscores instead of hyphens in the permalink
- Make post slug have priority over category slug
- Adding anchor to paginate_links + Safari anchor bug
- How to stop permalink redirects for a particular slug
- 404 on category.php pagination
- flexible rewrite ‘ramble’ URLs with WordPress
- Changing pemalink structure to /%post_id%/%postname%/
- Posts not working on windows after changing permalinks
- Custom permalink structure
- How to get rid of index.php?
- Relative or Absolute Paths for Flash Video Player Files
- Update Old Links To Pretty Permalinks Custom Post Type
- Remove Custom Taxonomy Slug from Permalink
- remove permalink trailing slash
- Use Single Blog Post as Site Front Page Without Redirect
- WordPress Links Not Working After Migration
- Redirect old permalinks with Month and name to Post name on new site
- Migrating WordPress blog to New Webhosts, something is adding a # and gibberish
- .htaccess – Redirect duplicated post ended in ‘-number/’ to the same url without the -number/
- WordPress Permalinks on Mac OSX Server 5 (El Capitan)
- Adding File Extensions to Attachment Page Permalinks
- How to find out who handles a permalink?
- Permalink /%category%/%postname%/ returns 404 on OSX
- Page Attachment Permalink Structure based on Menu Order?
- stop the_permalink printing and save as variable?
- Use Regular Expression to get tag from permalink url during wp_rewrite in generate_rewrite_rules
- Permalinks for pages
- Programatically changing post’s permalink when identical post type is published
- Remove parent category from permalink but keep breadcrumbs structure
- Is there a link parameter that will show me all my published pages?
- Add prefix to page URL based on the page template
- How to remove specific category from URL in WordPress
- How to set permalinks when posts and pages have different URL structures?
- redirect/ %category%/%postname%.html to /%category%/%postname%
- Permalink /%postname%/ doesn’t work
- How to change hierarchical page permalinks to be flat
- Permalink structure with $_SESSION variables
- Relative v.s. absolute URLs: which ones should I use for cross-domain portability?
- Permalink in WordPress loop outputs for each new line
- Freeze child page URLs so parent permalink changes don’t give 404s?
- What causes /pages/ to appear in URI, and how to remove it?
- How Do I get the author’s page id?
- WordPress Installed But Not Showing Up! [closed]
- Echo title with permalink
- Importer failed to import posts as format “day and name”
- Old site posts broken after domain update
- Redirect From Url To Url
- how do prevent wordpress from creating permalinks for media files
- help to remove last trailing slash using add_rewrite_rule
- change WordPress permalinks and redirect new urls 301
- Changing permalink structure and domain
- Permalinks not working in WordPress
- Why does enabling Permalinks make pages not found?
- WordPress Permalink Redirect 301
- problem with pagination in custom permalinks
- Problem by $output and permalinks
- Pretty permalinks and Facebook comments
- WordPress upgrade from 2.7 to 3.3 Permalink problem
- /%post_name%/ or /%postname%/ in Permalinks?
- Remove international characters from slug – Almost done – Bit help
- flush_rewrite_rules on MultiSite
- A dash can replace a period in a link, how to fix it
- Remove character from permalink
- Post name permalinks File not found — Mac High Sierra
- WordPress image title attribute becomes permalink? [duplicate]
- Nested permalink without dummy parent page
- Website URL Permalinks
- redirect any category in URL to the ID and post-name only – hundreds of pages affected
- permalink as content
- Permalinks Question: Adding a prefix ONLY in front of all posts with the ‘video’ post format
- How to get a clean pagination link without variable
- WordPress website redirecting to old domain if I not specificy / at the end
- Post permalinks go to the home page
- Add a product attribute to permalink in WooCommerce
- Remove index.php from url in permalinks over IIS server (web.config)
- add bar in paging in the URL
- WordPress Page URL
- LetsEncrypt WordPress on the Raspberry Pi – Nice url’s give 404 with https, http works
- On IIS, stop WordPress from resaving my web.config file when I enter the Permalinks config page
- Rewrite single template permalink?
- Can’t access WordPress site in subfolder possibly because of .htaccess redirect from root installation?
- Development before domain name chosen
- Permalink, links a page to the homepage
- Permalink broken for pages after adding rewrite rule
- Editing the variables in a custom URL
- Pretty Permalinks cause site to crash on main domain
- [Plugin leenk.me]modify get_the_title
- get_attachment_link() adds a hashtag to URL
- Include other parameters in permalinks for better management of browser history
- get_posts displaying wrong permalink for “continue reading” link
- Is it posible to translate a url prefix?
- AllowOveride All causes assetts and Admin Urls to 404
- Page permalinks are http but show up as https?
- Remove parent product category slug from product_cat url woocommerce