Forums

[resolved] GoogleNews Plugin but it's PHP Help actually (3 posts)

  1. arcab4
    Member
    Posted 3 years ago #

    hello,

    for the googlenews plugin, the syntax is this:

    <?php do_action('google_news', 'feedname'); ?>

    feedname is how you tell what google news to show up. so for example, if you want googlenews on automobiles..the syntax would be:

    <?php do_action('google_news', 'automobiles'); ?>

    i was wondering if it was possible to make "feedname" automatically be filled in with the post name (for example if the post was http://www.domain.com/honda) it would be:

    <?php do_action('google_news', 'honda'); ?>

    Thanks!

  2. Otto
    Tech Ninja
    Posted 3 years ago #

    This might work:
    <?php do_action('google_news', $post->post_name); ?>

  3. arcab4
    Member
    Posted 3 years ago #

    otto42,

    you are the man! that worked great. thanks and have a great weekend.

Topic Closed

This topic has been closed to new replies.

About this Topic