• I’m looking for a way to direct Google to a longer version of a post (an excerpt and a button to original page) for clicks from Google search. Direct users would click on a link that goes directly to the source site.

    Here is an example from realclearpolitics.com:

    From Google: https://www.realclearpolitics.com/2020/06/12/why_donald_trumps_juneteenth_speech_will_be_a_disaster_514108.html

    Directly: https://www.cnn.com/2020/06/11/politics/donald-trump-tulsa-juneteenth-race/index.html

    Thanks

    • This topic was modified 5 years, 11 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 1 replies (of 1 total)
  • Just an idea, you could check the referrer inside the WP loop with PHP

    if ( FALSE !== strstr( $_SERVER['HTTP_REFERER'], 'google.com') ) {
        the_content();
    } else {
        the_excerpt();
        // then maybe code for button to full content, could just load it with AJAX or JS/CSS
    }

    BUT this would be unreliable for several reasons. I’m sure someone has a better solution, but this one would work at least some of the time.

Viewing 1 replies (of 1 total)

The topic ‘Create Post Version for Google’ is closed to new replies.