Google Ads Costs South Africa & PPC Management Pricing

Navigating the realm of Google Ads can be a daunting task, especially for newcomers venturing into the digital marketing landscape. Google Ads is a powerful tool that businesses in South Africa, and around the world, rely on to boost their online presence. However, it is essential to have a clear understanding of its cost structure and management fees in order to fully utilise its potential without depleting your marketing budget.

Google Ads Costs In South Africa & PPC Management Fee Pricing

Understanding Google Ads Cost

Google Ads costs vary depending on various factors. It operates on a pay-per-click (PPC) model, so you only pay when someone clicks on your ad. This option offers flexibility and cost-effectiveness, making it suitable for businesses of any size. However, there are several factors that can impact the cost:

  1. Competition in Keywords: Keywords that face intense competition, often linked to greater search volumes and user intent, usually come with a higher price tag. Optimising keyword selection involves considering factors such as relevance, competition, and budget.
  2. Ad Quality and Relevance: Google values ads that are carefully crafted and directly related to the user’s query. Having higher quality scores can result in reduced costs per click and improved ad placements.
  3. Bidding Strategy: You have the option to choose automated bidding strategies that can adjust your bids to achieve specific goals, such as maximising clicks or conversions. Alternatively, you can set manual bids for more control over your bidding process.

PPC Management Fees & Pricing

When it comes to managing Google Ads, businesses often seek assistance from agencies or consultants to enhance their campaigns. The fees charged by service providers can differ significantly depending on their level of expertise, the complexity of your campaigns, and the level of service you need. In most cases, fees can be structured as:

  1. Percentage of Ad Spend: A popular approach where the fee is calculated as a percentage of your overall ad spend, usually falling between 10% and 20%.
  2. Flat Fees: Certain providers offer services for a fixed monthly fee, which can be attractive for businesses with a steady ad spend.
  3. Performance-Based Fees: These fees are not as common, but there are some agencies that offer them. They are based on the performance of the campaigns, which means that their success is directly tied to yours.
Google Ads Costs In South Africa & PPC Management Fee Pricing

Get The Most Out of Your Investment

To maximise the effectiveness and efficiency of your investment in Google Ads, it is important to implement the following strategies:

  1. Consistent Improvement: Regularly analyse and fine-tune your campaigns using performance data. I am responsible for fine-tuning keywords, ad copy, and targeting settings.
  2. Enhance Your Ads with Extensions: Take advantage of ad extensions to add extra information to your ads, such as location, contact details, or product highlights, without any additional cost.
  3. Emphasise Quality Score: Enhancing the relevance of your ad and optimising the landing page experience can lead to cost reductions and higher ad placements.
  4. Understand Your Audience: Gain a thorough understanding of your target audience’s behaviour and preferences. Customise your ads and landing pages to cater to their specific needs and boost conversion rates.

Benefits Of Using A PPC Ads Manager For Your Campaigns:

Although Google makes it very easy for any business owner to open a Google Ads account and start running ads for their business, there are a number of pitfalls waiting for an unknowing marketer. With the ease of running ads, it is very easy to spend a lot of money on Google Ads without seeing much return.

We suggest that most businesses would see a benefit in using a PPC management company to run their Google Ads account.

Some of those advantages are:

  1. Expertise in Targeting: It is important to understand how people use Google to search for your product or service as well as effective techniques to target them.
  2. Optimised Ad Spend: Ensures your budget is used efficiently for maximum return on investment.
  3. Up-to-Date with Trends: PPC managers understand the latest developments on the Google platforms which are changing all the time.
  4. Time-Saving: Manages all aspects of your PPC campaigns, saving you valuable time and money.
  5. Performance Monitoring: Regularly tracks and adjusts campaigns for optimal performance.
  6. Conversion Tracking: The real power of PPC ads comes from conversion tracking on your website. Not many businesses know how to track conversions effectively not heir website. Even some PPC managers do not know how to set this up correctly. It is really important that you choose an agency that sets up tracking for your website.
  7. Excessive Automation: When running Google Ads as a business owner Google automates many of the settings, as well as providing limited features for your ad accounts. This often leads to wasted ads budget as ads run on unrelated keywords or for services and products you do not offer. A PPC manager takes the time to understand your business and then uses their knowledge of PPC ads to run the most effective campaigns.
  8. Avoid Common Pitfalls: Helps navigate the complexities of PPC advertising to avoid costly mistakes.
  9. Strategic Planning: Provides strategic guidance to align your PPC efforts with your business goals.

When it comes to diving into the world of Google Ads in South Africa, it’s crucial to have a deep understanding of the cost structure and the art of campaign management. Navigating the intricate landscape can be challenging, but the potential benefits of heightened visibility and business expansion are significant. Whether you’re a small local business or a large corporation, having a strategic approach to Google Ads can give you a significant advantage in the competitive digital arena.

Keep in mind that achieving success with Google Ads depends not only on the amount you spend, but also on how strategically you allocate each Rand. By adopting a strategic mindset and focusing on optimisation, your Google Ads campaigns can deliver impressive results while staying within your budget.

Storyteller Most Reviewed Agencies South Africa
Storyteller Most Reviewed Agencies South Africa

At Storyteller, we are passionate about helping our clients grow online. We employ simple marketing strategies to increase targeted traffic to your website and social accounts and optimize them to increase leads that turn into sales and kick-starts growth.

Because of the great care and attention we put into our clients’ projects, Storyteller was officially recognized by The Manifest as a leading company in South Africa’s digital marketing industry!

To give you an idea of how much this means for us, we will tell you more about ourselves.

In 2012, Clyde Thomas founded Storyteller to help businesses interact with their customers online through the sometimes intricate art of search engine optimization, Google Ads, and beautiful clean web design.

In 2018, one of our longstanding clients, Secret Cape Town, needed help with SEO, website ranking, social media strategy, and paid social media ads. We helped the client by optimizing their different social media accounts, ongoing SEO, and advertising campaigns that drive traffic to their social media platforms.

“We have grown our website traffic to over 10 thousand and aim for over 20 thousand within the next 6 months. On social media, we have grown by over 40 thousand followers in a year.” – Shae Bolland-Johnson, Social Media Manager, Secret Cape Town

In 2022, The Manifest highlights South Africa’s 15 most reviewed B2B service providers, naming Storyteller among the leaders in the digital marketing space. We’re truly honored to receive this award as it validates our commitment and hard work to ensure client satisfaction.

“It is fantastic to be recognized as one of the top SEO agencies in South Africa by the top ratings and reviews platform for IT, Marketing, and Business service providers. Hopefully, we will continue to grow and feature even higher on Clutch’s listings.” – Clyde Thomas, Managing Director, Storyteller


Tell us your story. We would love to hear how we can help you. Partner with us to help your business thrive and grow in the age of Google search.

Top SEO Agency South Africa Clutch

Let’s face it, digital marketing and SEO have been very important industries in today’s digital age. Along with PPC and Social Media Marketing, these digital services have been shaping businesses and companies online. Storyteller knows how vital these services are that’s why we are here to help you! We are an SEO and Digital Marketing services company and we love helping our clients grow online.

We’ve been passionate about our services and it shows in the accolades and awards our team received throughout the years. Today, we are adding another one under our belt and it is a Clutch award! Their team recently announced the top SEO agencies in South Africa and we are fortunate enough to be included on that prestigious list.

Being a Clutch leader is truly an amazing accomplishment for us and we are very happy that we get to celebrate it with you, our clients!

Here is our WordPress and SEO Specialist, Kuda, for a few words of acknowledgment:

“It is fantastic to be recognized as one of the top SEO agencies in South Africa by the leading ratings and reviews platform for IT, Marketing, and Business service providers. Hopefully, we will continue to grow and feature even higher on Clutch’s listings.”

Clutch, for those that don’t know, is the leader in connecting global service providers with corporate buyers from around the world. The ratings and reviews platform publishes the most extensive and referenced client reviews in the B2B services market.

Interested in knowing more about us and our services? Let’s talk! Our team is always looking for new challenges to take and new clients to help. Tell us your story. We would love to hear how we can help you.

Best Payment Gateway for Shopify in South Africa

One of the most important decision to make when setting up your Shopify ecommerce store is which payment gateway to use to process payments online. It is crucial to establish which of the payment gateways does your ecommerce site support. When using Shopify, the options for payment gateways are:

How To Set Up Google Tag Manager (GTM) On A Squarespace 1

Squarespace makes it quite simple to add your Google Analytics tracking code to your website, but sometimes you want more information on how people are exploring your website. For example you might want to know how many people click on your phone number or email address on your website or submit your contact form.

In order to do that you first need to add Google Tag Manager to your Squarespace website and send that information to Google Analytics.

Add Google Tag Manager On Squarespace In 5 Easy Steps

  1. Create Your Google Tag Manager Account
  2. Link Google Tag Manager To Your Squarespace Site
  3. Start Tracking Google Analytics Data With Google Tag Manager ( GTM )
  4. Disconnect Google Analytics From Your Squarespace Site
  5. Test & Publish Your Tag

By using Google Tag Manager (GTM) you will be sending your page view data to google Analytics via GTM rather than a Google Analytics code.

Step 1 – Create A Google Tag Manager Account

Log into your Google account using the appropriate gmail/google email account and password. Then go to the Google Tag Manager website – https://tagmanager.google.com. Click create new account and fill out your companies/websites details.

How To Set Up Google Tag Manager (GTM) On A Squarespace Website

Think of each account in your Google Tag manager account as your business, and then you can have multiple properties or containers for each of your websites in a similar way to Google Analytics.

Add your

  • Company name
  • Select your country
  • Paste your website address under the container name. Do this without any http:// or https://
  • Select the appropriate platform – usually Web
  • Then accept the Terms & Conditions
How To Set Up Google Tag Manager (GTM) On A Squarespace Website - New Account

A window will pop up which contains the code you will need to add to your Squarespace website. It will look like the image below.

if you have already set up your Google tag manager account then click Admin -> Install Google Tag Manager in your GTM account page.

How To Set Up Google Tag Manager (GTM) On A Squarespace - Code
This is the code you will use to paste into your Squarespace site.

Step 2 – Link Google Tag Manager To Your Squarespace Site

Open another tab onto your Squarespace backend account view.

In Squarespace go to your base/config page. Click on Settings -> Advanced -> Code Injection

How To Set Up Google Tag Manager (GTM) On A Squarespace - Menus

Now copy and paste the code given to you by GTM into the following locations. You can use the icon to automatically copy the complete code.

  1. Copy the <head> code and paste it into the first code input field labeled “HEADER” on the Code Injection page on Squarespace.
  2. Copy the <body> code and paste it into the second code input field labeled “FOOTER” on the Code Injection page on Squarespace.

Hit “Save” to update the changes you have made.

How To Set Up Google Tag Manager (GTM) On A Squarespace - Code Injection

Step 3 – Start Tracking Google Analytics Data With Google Tag Manager ( GTM )

You are now going to set up Google Tag manager to send your page view information to your Google Analytics account. ( We have assumed you already have a Google analytics account )

On your Google Tag Manager account click on Workspace in the top left corner of the page.

How To Set Up Google Tag Manager (GTM) On A Squarespace - Workspace

Once there click on “New Tag” and configure your Tag

  • Tag Type – Select “Google analytics – Universal Analytics”
  • Track Type – “Page View” ( leave as is )
  • Set up the Google Analytics Settings on a “new variable”
    • Click on the dropdown arrow
    • Click on “new variable”
    • A new window will slide out from the right.
    • Name your variable ( Top left ) – Eg Google Analytics Settings
    • Paste your Google Analytics tracking ID code into the “Tracking ID” field
    • Leave the “Cookie Domain” as auto
    • Click “Save”
  • Now click on the Triggering section below the configuration section
  • Select “All Pages” as the Firing Triggers
  • Name Your Tag ( Top Left Again ) Eg Google Analytics Page View Tag
  • Click “Save” ( Top Right )
How To Set Up Google Tag Manager (GTM) On A Squarespace - New Tag 1
How To Set Up Google Tag Manager (GTM) On A Squarespace - New Tag 2

Step 4 – Disconnect Google Analytics From Your Squarespace Site

You do not want Google Analytics to double count the people coming to your website, so you want to remove your Google Analytics Tracking ID from the usual place you enter it in Squarespace. If you have not linked your Google Analytics account before you can skip this step.

In your Squarespace backend click -> Settings -> Advanced -> External API Keys

How To Set Up Google Tag Manager (GTM) On A Squarespace - Remove GA Code

Then remove/erase the code in the “Google Analytics Account Number” field.

How To Set Up Google Tag Manager (GTM) On A Squarespace - Remove GA Code 2

Step 5 – Test & Publish Your Tag

In order to see your changes and send the data to Google Analytics you need to publish your changes.

  • In the far right hand corner click “Submit”
  • Add a version name – eg a date or code that you can continue to use for each update.

Once this is done you can see if your changes are working and if information is being sent to GA. There are a few different ways to do this. The easiest way is to go to your Google Analytics account.

  • Click on the appropriate property
  • Click on “Real Time” view, then “overview”
  • In another tab or browser go to your website
  • leave that tab open and go back to your Google Analytics tab and you should see some activity.
How To Set Up Google Tag Manager (GTM) On A Squarespace - Real Time View

Congratulations you have set it up correctly. If you have any issues please comment in the post below.

The next step is add some advanced tracking tags to your Squarespace site. This blog post explains it beautifully. read how to add tags to track your Squarespace forms.

How Do I Add Google Tag Manager To My Squarespace Website

1. Create Your Google Tag Manager Account
2. Link Google Tag Manager To Your Squarespace Site
3. Start Tracking Google Analytics Data With Google Tag Manager ( GTM )
4. Disconnect Google Analytics From Your Squarespace Site
5. Test & Publish Your Tag

Where Do I Put My Google Tag Manager Code In Squarespace

In your Squarespace backend go to your home/config page. Click on Settings -> Advanced -> Code Injection

Now copy and paste the code given to you by GTM into the following locations. You can use the icon to automatically copy the complete code.

Copy the <head> code and paste it into the first code input field labeled “HEADER” on the Code Injection page on Squarespace.
Copy the <body> code and paste it into the second code input field labeled “FOOTER” on the Code Injection page on Squarespace.

Hit “Save” to update the changes you have made. How To Set Up Google Tag Manager (GTM) On A Squarespace - Code Injection

Why Should I Use Google Tag Manager Instead Of Google Analytics On My Squarespace Website?

Squarespace allows limited coding ability on your website so it is not easy to create click events to track in GA. The best way to track button clicks, phone call and email clicks as well as contact form submissions is to use Google Tag Manager and send that data to your Google Analytics account so that you can then link that information with your Google Ads, other PPC account or social media advertising account.

Once you’ve created your Google Analytics account, you can add extra users to access your information. This way multiple users can view your data. You can also create specific permissions per user, ranging from only viewing the data, to editing it.

If you want to only share information about your Google Analytics, it’s best to rather grant access to someone, instead of sharing your login details.

Step 1: Open the Settings in Google Analytics

After you have signed into your Google Analytics account, choose the site to which you want to grant access.

Google Analtyics Grant User Access Choose Account 1

 

Next, click on the Admin option. This is the gear icon in the bottom left of your screen.

 

There are three types of access levels under the User Management option. Account, Property and View.

Account:this allows a user to add more users, extra websites, as well as link AdSense and AdWords data.

Property:this allows a user access to the tracking code. The user can also adjust the retargeting code and settings on a specific website.

View:this allows a user to view reports, add new goals and content groupings.

Google Analtyics Grant User Access User Management

Step 2: Grant Access to a User

To add a new user, you will need to make sure that the person has either a gmail account, or that their email is registered in Google Accounts. You have to decide on which level you want to grant access (account, property or view).

Click on the “+” icon on the column you want to add the user to (account, property or view)

Google Analtyics Grant User Access Add New User

From the drop-down menu, click on “add new users”

Different types of permission can be assigned to a new user. You can choose between manage users, collaborate, edit or just read and analyze.

Manage Users: a user can add or delete users and assign permissions. This permission does not include the option to Edit or Collaborate.

Edit: access to administrative as well as report-related functions. This includes adding/editing/deleting accounts; access to properties, filters, views and goals. But it does not include managing users. A user with this permission can also see report data. This permission is required at the account level in order to create filters, and at the view level to be able to apply filters. It also includes Collaborate.

Collaborate: with this permission a user can create, edit, delete, as well as share personal assets. The shared personal assets include: dashboards, segments, conversion segments, attribution models, channel groupings, custom reports, and unsampled reports. The user can also collaborate on shared assets and it includes the Read & Analyze permissions.

Read & Analyze: the user can view report and configuration data. The data can also be manipulated within reports for instance to create a segment, add a secondary dimension, or filter a table. The permission allows the user to see shared assets, create personal assets, and share them. But it does not allow Collaboration on shared assets.

Google Analtyics Grant User Access Add New Users Email Address

Enter the email of the user you want to add. You can send a notification email to the new user. Finally, click on add.

How to Modify the Permissions of an Existing User

Once you have created a user, you can modify the permissions assigned to the user at any time.

After you have signed into Google Analytics account, choose the site to which you want to change access. Next, click on the Admin option.

Choose the column of the level you want to change and click on User Management.

You can search for the user you want to change in the search box located at the top of the user list. Type in part of the email address or the full address.

Click on the user name, and then you can add or change permissions.

Remember to click Save.

How to Delete A User

After signing in to your Google Analytics, click on Admin and choose the account you want to change.

Click on User Management in the column you want to edit (account, property, or view)

Search for the user you want to change in the search box.

Check the box next to the user you want to delete.

Click Remove.

How To Get More Google Reviews

You’ve created your free Google business listing, now the next question pops up: how do you get people to review your business? The quick answer, you can send people a direct link to review it. But let’s investigate the step by step process and learn all the little secret tricks.

Google My Business

How to Get Reviews on Your Listing

We all know the power of the internet, over 90% of consumers do an internet search before deciding which company they will become loyal to.  Creating a Google listing should be a part of your reputation management strategy.

The easiest way to get people to review your business, is to make it as straightforward as possible. After you’ve completed a project or delivered your goods, contact the customer directly, thanking them for the business and request a review.

By including a direct link to the review, you ensure that the customer doesn’t lose interest or become frustrated because it is too complicated to figure out the reviewing process. Although there are various search engines out there, Google is by far the most popular and powerful.

Did you know? More than 80% of online queries are performed on Google

Reviews on your Google My Business listing is completely transparent to the public. Potential customers can form an independent opinion of your business, not through what you want to tell them about your product or service on your website, but through real customer reviews.

How Important Are the Reviews?

These reviews should not be taken lightly, studies show that 84% of people give the Google reviews as much authority as a personal referral from a friend or family member. The reviews also serve the purpose of adding oomph to your Google ranking on search page results.

After your first five reviews, you will start seeing organic search engine traffic results for your business. This means your listing will appear more frequently on the first page of search results. It might be tempting to try and create your own reviews, but this tactic will backfire in the long run. Google’s main aim is to provide relevant and useful information for its users.

Create A Prefilled 5-Star Review for Your Customers

How To Get More Google Reviews 2

Although you don’t want to tamper with the review results, you can use a technique of creating a link with the 5-stars automatically filled in for customers to use. The aim of a review is to get both a star ranking as well as personal feedback from your satisfied customers.

To create this link, you will need a mobile phone. Once created, it will be functional for reviewing from any device. It will take a bit of effort to set this up, but it’s highly recommended to invest the time to prepare it.

To start the process, verify your address once you’ve created a Google My Business page. Next, open an incognito page on Google Chrome from your phone. Go to your company’s listing on Google My Business. You will see a Knowledge Graph with your company’s details.

Find the section called “Review and Rate”. On the right you can tap the 5 stars. Click on the “Leave a Review” page. You can now copy the address from the URL bar with the automated 5-star review into an email. Use a URL shortener to create a sleeker URL to send to your customers. Before sending it to a customer, first test it out on your own phone and computer.

Note: if you struggle with this technique, contact one of our Cape Town SEO specialists to assist you with the process. Click here for help.

You can also consider adding the review option onto your website, with a specific page dedicated to reviews. Use the automated review link and change it in your website backend to something more relevant, such as https://www.companyname.com/review. This can be done through a 301 redirect link.

Next, you can create a message to request a review from a customer. Remember, the point of the reviews is to receive honest feedback. Once you’ve sent the link to the review, the response is out of your hands. If you believe the review violates the Google listing policies, you can flag it for removal.

Create a message thanking the customer/client for their business. Request a short, honest review for your Google My Business listing, including the link you’ve created. Remember that the customer is under no obligation to leave you a review, so you need to choose your words carefully to not make the request seem forced.

If you were using other communication methods such as SMS or WhatsApp, you can consider using this. But it will depend on your level of relationship with the customer. Emails are generally seen as a less intrusive method.

Your customer needs to have a Google account to create a review. Add a note in the review request email to explain this to the customer, to avoid frustration when the link doesn’t work. Many people have Gmail accounts, but you most likely were communicating with a client via their official work email.

Google Accounts are also linked to YouTube, Android phones, Blogger and more. It is also linked to other Google services such as Google+, Drive, Analytics, AdWords, Search Console, Calendar and more.

The reason Google decided to add this security method, is to prevent anonymous reviews, that can promote dishonesty and malicious attacks. If your customer doesn’t have a Google account, you can alternatively request a review on your Facebook page.

Alternative Method to Create A Review Link

If you feel uncomfortable with the above suggestion of preselecting 5-stars for the review, you can create a link from a Google Search. Use your computer to create a more accurate link. Firstly, search for your business on Google. Locate the listing on the right, scroll down and click “write a review”. Next, copy the URL in the address bar. Use the URL shortener to create a more professional link. You can use a link building service such as bitly.com to track and optimise your links.

Three Key Changes to Google Review Guidelines

These changes affect the Google algorithm’s filtering process. The guidelines aim to specifically deal with review spamming. Another big change is that the criteria is now part of the Google Maps content policy.

Mostly the guidelines are straightforward no-go’s that make logical sense. It deals with major issues such as no adult content, no hate speech, no confidential info, no copyrighted or illegal content, and more.

#1 Former/Current Employees Cannot Leave Reviews

Previously this was a grey area and sometimes Google did not want to comply with deleting a horrible review. Now the system is on your side and you can rest assured that a disgruntled employee can’t publicly badmouth you on your business listing.

#2 Do Not Request Reviews in Bulk

This change is a bit tricky, as the criteria for “bulk” is very ambiguous. An easy rule of thumb to use, is to not get trigger happy with sending out hundreds of emails to customers every day and getting more than 10 reviews in a day.

As always, the Google algorithm is a mystery. Does a link used too frequently trigger the system? If this is the case, is it the click on the link or the actual review that sets off the bulk sensor? Google tracks links in emails, so the system alert could possibly pop up after the same link has been sent out multiple times in a day.

The volume of reviews linked to the historical trends could also potentially be a trigger. This sometimes happens after a listing had been dormant for a while and suddenly the owner decides to start requesting reviews from customers.

Rather start slowly and build up your reviews in a more organic way. As you finish a project, send out the review request, as mentioned above. And spread out the review invitations to older customers across a few weeks.

#3 Missing: Mention of Kiosks

In the previous set of guidelines, it was clearly stated that you should not set up a review kiosk or station at your business. Although the new guidelines do not explicitly mention the use of review stations, you should read between the lines with this one.

It’s mentioned on Google’s Get Reviews page that you should inform your customers that it’s very easy to leave a review from a phone or computer. It’s been proven that Google tracks the devices from where the reviews are generated. So, if numerous reviews appear from the same device, Google will most likely filter them out.

Please Note: it’s against the Google Review Guidelines to incentivise people to leave a review.

Spam Alert

Local guides are encouraged and incentivised to create longer reviews with photos. Keep an eye on the frequency of reviews on your listing. If you notice a suspicious increase in reviews, check the source of the review. There is a photo spam on the rise from fake LG profiles.

Let Storyteller Design Assist You with Your Google Business Listing

Creating a professional business listing can boost your online presence in many ways. Potential customers can get a better idea of your business identity. Also, with a well-written “about us” section and good choice of photos, your business listing can be effectively turned into a virtual brand ambassador. The choice of words in the description can also be used to boost your SEO ranking on the search result pages.

Contact us now for a free evaluation. Let us help you harness the power of the Google Business listing!

ACF Fields With Shortcodes

I have noticed that when Google populates the search results for this question there are actually two different questions being asked by a similar search.

The first asks:

How do I create a shortcode that outputs the value of an Advanced Custom Fields (ACF) plugin field.

The second asks:

How can I dynamically populate a short code using the Advanced Custom Fields plugin.

I was trying to find the answer to the first question, but I will try to show both answers here, so that you do not have to search again.

How do I create a shortcode that outputs the value of an Advanced Custom Fields plugin field.

 

  1. To do this you must first install and activate the ACF plugin on your WordPress website. You can download the free version here.
  2. Create a field group with the information you want to use. You can learn more about how to do this on the ACF website.
  3. Once you have your field set up you can start creating your shortcode. You are going to do this in the functions.php file of your child theme.
    • First create a function. Here is an example<
      function my_shortcode() { 
      
      	$myfield = get_field('my_field',false,false);
      	
      	return $myfield ;
      	
      }
      

      The trick here is to first create a variable using the get_field ACF function and then return that value as the output for the function./li>

    • Once that is done you need to register your function as a shortcode.
      add_shortcode( 'myshortcode', 'my_shortcode' );
      
    • Putting it all together you get
      function my_shortcode() { 
      
      	$myfield = get_field('my_field',false,false);
      	
      	return $myfield ;
      	
      }
      add_shortcode( 'myshortcode', 'my_shortcode' );
      

It is important to note that you only need to worry about this if you are using more advanced field than just a text field. If you are only using a text field you can use the inbuilt ACF shortcodes.

e.g.

[acf field="field_name" post_id="123"]

You can learn more about that here.

How can I dynamically populate a short code using the Advanced Custom Fields plugin.

 

Since I didn’t have to actually code this, I am taking it from an example I found on StackOverflow. You can read it here.

Say you have an ACF field ‘contact_form’ which is the ID of a contact form 7 form. You want to populate this ID dynamically using ACF.

Your normal short code that you would use in a template is

echo do_shortcode( '[contactform id="1457"]' );

To get this to work is as simple as

echo do_shortcode( '[contactform id="'.get_field('contact_form').'"]' );

The trick here is to use the ACF get_field() function instead of the ACF the_field() function.

Please note that the contact form 7 short code has been changed so that it is not called here, and you can see how we use it. Otherwise we get a 404 contact form shortcake showing.

I hope this helps.

If you have any questions please leave a comment below.