How To Add Sponsored Post Prefix To Post Title In WordPress
How To Add Sponsored Post Prefix To Post Title In WordPress

Would you want to use a ‘Sponsored Post Prefix’ to publish access titles in WordPress as a result?  Once you begin publishing sponsored content, you must indicate which posts are paid for. You might do this by adding the phrase ‘Sponsored’ to the article title or by including a disclaimer in the post body.

We will teach you exactly how to add sponsored post prefix to post titles in WordPress but before that let’s clear the basics.

What are sponsored posts?

Sponsored post, otherwise called a promoted post, is a post to any local area driven warning focused site which is expressly supported as a commercial by a specific organization to draw a lot of prominence through client advancement and control to the most dynamic or most viewed page on the site.

You can watch the video tutorial below for this article:

Various ad-supported yet community-driven websites have embraced the approach as an addition, supplement, or replacement for conventional pay-per-click commercial formats such as web banners, text, and rich media.

Explicitly alluding to setting of online journals, “supported posts” were characterised by Mutum and Wang (2010) as “advanced blog sections or posts that contain joins that highlight the landing page or explicit item pages of the site of the backer for which the blogger gets remuneration as cash, items, administrations or in alternate ways”. They are otherwise called paid posts or supported audits. 

Sponsored postings can also be used to limit the potential of firms paying users to regulate a submitted link or media to the website’s main page, which frequently violates the spirit or text of a site’s Terms of Service.

Why Should You Include a Sponsored Post Prefix in Your Posts?

When your WordPress blog begins to get traction, you may begin to consider how to monetise it. You can easily earn money online by doing what you enjoy, such as blogging and utilising WordPress. Sponsorships are one of the various methods to do this. A corporation will give you money for fulfilling the following duties: promote, discuss, and advertise their product to your intended audience. The sponsorship might be for a single post or a long-term partnership.

When posting sponsored content, it’s critical to be aware of the disclosure rules in your area. In the U.S.A, for example, a blogger who posts a promoted item must adhere to the Federal Trade Commission’s Endorsement Guidelines. This incorporates unveiling at whatever point a post is supported. One method is to add a prefix to the title of each sponsored article.

Now, let’s get to the juicy part.

  • Go to your WordPress Admin Dashboard.
  • Hover on to Appearance and then click on Theme Editor.
  • Now, go ahead and click on Theme Functions.
  • Now, here you have to add a small piece of code.
How To Add Sponsored Post Prefix To Post Title In WordPress
How To Add Sponsored Post Prefix To Post Title In WordPress

NOTE: Before making any code-related changes, it is suggested to have a backup of your website JUST IN CASE anything goes wrong, then you can at least restore it afterwards.

Code:

add_filter( ‘the_title’, ‘wpb_sponsored’ );

function wpb_sponsored( $title ) {

   global $post;

   $sponsored_text = ‘<span class=”sponsored_text”> Sponsored Post</span> ‘;

   $sponsored = get_post_meta($post->ID, ‘sponsored’, true);

   if( $sponsored == ‘true’ && in_the_loop() ){

       return $sponsored_text.$title;

   }

   return $title;

}

This code might be answerable for including the backed publish prefix to publish titles.

  • Now, click on the Update File button.
  • Afterwards, hover on to Posts and then click on All Posts.
How To Add Sponsored Post Prefix To Post Title In WordPress
  • You can both create a brand new publish or edit an current one.
How To Add Sponsored Post Prefix To Post Title In WordPress

Although we will be editing an existing one. So,

  • Click on Screen Options on the top right hand corner. 
  • Then, check the tick beside the Custom Field box.
  • Further, scroll down and within-side the Custom Field Meta-box, click on on Enter New and upload Sponsored within-side the custom discipline name.
How To Add Sponsored Post Prefix To Post Title In WordPress
How To Add Sponsored Post Prefix To Post Title In WordPress
  • Type True in the Value field next to it.
  • Then, click on at the Add Custom Field button.
  • Once added, click on at the Update button

Now, you can go ahead and move to your website to check. As lengthy as you observed the stairs correctly, you’ll see the backed publish prefix to publish titles.

Also Read: How To Add WordPress Widgets In Accessibility Mode

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Need Professional Help?

We can help you with website fixes and ongoing maintenance.