=== Preferred Source in Google ===
Contributors: bloggerpi
Tags: google, preferred sources, seo, publisher, content, button
Requires at least: 6.2
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A responsive Google Preferred Sources button for WordPress posts and pages.

== Description ==

Preferred Source in Google automatically displays an attractive, responsive Google Preferred Sources CTA before or after selected WordPress content. It is developed by Bloggerpi Digital.

Download and documentation: https://bloggerpi.com/downloads/preferred-source-in-google/
Source: https://github.com/byteeater/preferred-source-in-google

Features:
* Posts and/or pages; defaults to posts only.
* Before, after, or both placements.
* Google official publisher button (recommended), or a lightweight direct link.
* Shows exactly one CTA: Google's official button when available, otherwise a delayed direct-link fallback.
* Automatic domain detection, optional direct-link override.
* Mobile-responsive alignment and theme-scoped CSS.
* No analytics, custom tables, or persistent frontend data collection.

Important: Google's Preferred Sources feature does not guarantee higher rankings or visibility. A domain must be available in Google's source preferences tool. Official Google mode loads an external script from news.google.com.

== Installation ==

1. Download the plugin ZIP from https://bloggerpi.com/downloads/preferred-source-in-google/ or obtain the release archive.
2. Upload it via Plugins > Add New Plugin > Upload Plugin.
3. Activate Preferred Source in Google.
4. Open Settings > Preferred Source in Google.
5. Configure the content types, placement, and button mode.
6. Open a published post and inspect the frontend.

== Frequently Asked Questions ==

= Can I show the button on pages? =
Yes. Enable Pages from the plugin settings.

= Does it need JavaScript? =
Only the official Google interactive mode uses JavaScript. Direct-link mode is a normal HTML anchor.

= Can I change the official Google button text? =
No. Google controls and localizes the official button. Custom labels apply to direct-link mode and its fallback.

= Does this guarantee better SEO rankings? =
No. The feature helps readers select preferred publications in supported Google Search surfaces; it is not a ranking guarantee.

== Changelog ==

= 1.0.1 =
* Prevent duplicate official and fallback buttons (including Shadow DOM rendering).
* Improve spacing around the CTA and prevent layout shift while the button initializes.
* Provide a no-JavaScript fallback when the browser blocks scripting.


= 1.0.0 =
* Initial release with Google widget, direct-link mode, flexible placement, settings, and responsive styles.
