Title: Haghs Preferred Source Button for Google
Author: Benjamin Hagh Parast
Published: <strong>July 16, 2026</strong>
Last modified: July 16, 2026

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/haghs-preferred-source-button-for-google.
svg)

# Haghs Preferred Source Button for Google

 By [Benjamin Hagh Parast](https://profiles.wordpress.org/haghs/)

[Download](https://downloads.wordpress.org/plugin/haghs-preferred-source-button-for-google.zip)

 * [Details](https://wordpress.org/plugins/haghs-preferred-source-button-for-google/#description)
 * [Reviews](https://wordpress.org/plugins/haghs-preferred-source-button-for-google/#reviews)
 *  [Installation](https://wordpress.org/plugins/haghs-preferred-source-button-for-google/#installation)
 * [Development](https://wordpress.org/plugins/haghs-preferred-source-button-for-google/#developers)

 [Support](https://wordpress.org/support/plugin/haghs-preferred-source-button-for-google/)

## Description

**Haghs Preferred Source Button for Google** lets your visitors add your site — 
or the exact post/page they’re reading — to their Google Preferred Sources with 
a single click, using Google’s official `google.com/preferences/source` link format.
No API keys, no OAuth, no tracking scripts. Just a fast, simple button.

This plugin is developed independently by Benjamin Hagh Parast and is not affiliated
with, endorsed by, or sponsored by Google. “Google” and “Preferred Sources” are 
referenced only to describe the feature this plugin links to.

#### Features

 * Fully customizable button text
 * Choose where the button appears automatically: Header, Footer, Before Content,
   After Content, Navigation Menu, Floating Left, or Floating Right
 * Show the button on any public post type – Posts, Pages, or any custom post type
   registered by your theme or other plugins – defaults to Posts only, since blog
   content usually carries the repeat-visit value
 * Uses the exact permalink of the post/page being viewed, so visitors prefer the
   specific content they found, not just your homepage
 * `[hpsbg_button]` shortcode for manual placement anywhere, with optional `text`
   and `url` overrides
 * Open link in a new tab (optional)
 * Built-in guidance in the settings screen on Google’s Preferred Sources eligibility
   requirements, with links to check your own domain and to Google’s official documentation
 * Clean uninstall — removes its single settings option, no leftover data
 * No external libraries, no database tables, minimal CSS footprint

#### About Google Preferred Sources

Preferred Sources is a feature from Google that lets people choose the sites they
want to see more of in Top Stories, AI Overviews, and other personalized search 
surfaces. There is no submission or application process — Google determines eligibility
automatically by crawling and evaluating a site. Only domain-level or subdomain-
level sites are eligible (a subdirectory such as `example.com/blog` never qualifies
on its own), and eligibility is generally tied to publishing fresh, regular content
that Google would also consider for Top Stories.

You can check whether your own domain is currently eligible at [google.com/preferences/source](https://www.google.com/preferences/source),
and read Google’s own guidance at [Google Search Central’s Preferred Sources documentation](https://developers.google.com/search/docs/appearance/preferred-sources).
This plugin’s settings screen links to both, since the button itself is only useful
once your site already qualifies — it cannot make an ineligible site eligible.

## Installation

 1. Upload the plugin files to the `/wp-content/plugins/haghs-preferred-source-button-
    for-google` directory, or install the plugin through the WordPress Plugins screen
    directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress.
 3. Go to **Settings  Preferred Source Button** to configure the button text and placement,
    and to check your Google eligibility.
 4. Optionally use the `[hpsbg_button]` shortcode anywhere you want manual placement.

## FAQ

### Does this plugin use any Google API or require an API key?

No. It links directly to Google’s public preferences URL. No keys, no authentication,
no tracking.

### Will it show my homepage or the specific post URL?

When a visitor is viewing a single post or page, the button uses that exact page’s
URL. The “Fallback URL” setting is only used in contexts without a single post/page
in view (e.g. archive pages or the navigation menu).

### Can I control where the button shows?

Yes — under Settings  Preferred Source Button, choose Header, Footer, Before Content,
After Content, Navigation Menu, Floating Left, Floating Right, or disable automatic
placement and use the shortcode only.

### Can I show it only on blog posts and not static pages?

Yes. By default the button only shows on Posts. The “Show On” list includes every
public post type on your site (Posts, Pages, and any custom post types like Portfolio,
Products, etc.) so you can pick exactly which content types get the button.

### My site doesn’t appear in Google’s preferences tool – why?

That’s a Google eligibility decision, not something this plugin controls. See the“
About Google Preferred Sources” section above, and the link to Google’s own documentation
in the plugin’s settings screen.

### Is this plugin affiliated with Google?

No. It is an independent, unofficial tool that links to a publicly available Google
URL. “Google” and “Preferred Sources” are used descriptively only.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Haghs Preferred Source Button for Google” is open source software. The following
people have contributed to this plugin.

Contributors

 *   [ Benjamin Hagh Parast ](https://profiles.wordpress.org/haghs/)

[Translate “Haghs Preferred Source Button for Google” into your language.](https://translate.wordpress.org/projects/wp-plugins/haghs-preferred-source-button-for-google)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/haghs-preferred-source-button-for-google/),
check out the [SVN repository](https://plugins.svn.wordpress.org/haghs-preferred-source-button-for-google/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/haghs-preferred-source-button-for-google/)
by [RSS](https://plugins.trac.wordpress.org/log/haghs-preferred-source-button-for-google/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.2.0

 * Renamed plugin and slug to avoid trademark/naming confusion
 * Prefixed all functions, classes, options, constants, and the shortcode tag with`
   hpsbg`/`HPSBG` to avoid collisions
 * Added an eligibility information section to the settings screen, with links to
   check your domain and to Google’s official documentation

#### 1.1.0

 * “Show On” now lists every public post type (not just Posts/Pages), including 
   custom post types
 * Default changed to Posts only, since blog content is usually where repeat-visit
   value lives

#### 1.0.0

 * Initial release: customizable button text, placement options, post type targeting,
   per-post permalink targeting, and shortcode support.

## Meta

 *  Version **1.2.0**
 *  Last updated **9 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 5.9 or higher **
 *  Tested up to **7.0.1**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [button](https://wordpress.org/plugins/tags/button/)[google](https://wordpress.org/plugins/tags/google/)
   [seo](https://wordpress.org/plugins/tags/seo/)[shortcode](https://wordpress.org/plugins/tags/shortcode/)
 *  [Advanced View](https://wordpress.org/plugins/haghs-preferred-source-button-for-google/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/haghs-preferred-source-button-for-google/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/haghs-preferred-source-button-for-google/reviews/)

## Contributors

 *   [ Benjamin Hagh Parast ](https://profiles.wordpress.org/haghs/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/haghs-preferred-source-button-for-google/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://wordtune.me)