WordPress.org

Forums

Simple GA Ranking
Get results as query and filter (1 post)

  1. mayiris
    Member
    Posted 1 year ago #

    Hello! I really like your plugin. I'm not very programatically savvy, but seeing your plugin I figure you're somehow obtaining the post IDs of the Analytics top pages.
    Is there anyway to get the IDs of the result's posts as an array, instead of a shortcode?
    I'd like to experiment with adding the post thumbnails etc, but I couldn't figure out how to do it!
    Thanks for a great plugin :)

    EDIT; Nevermind, I figured it out!

    $ids = sga_ranking_get_date();
    Just call this and the IDs will be stored in the variable.

    I have another question though. I managed to get the IDs, but is it possible to filter the output by category or tag? I know your shortcode supports this, and figured it might be possible :)
    Like this;

    $args = array(
    	'category__in' => '423, 324',
    	'post_type' => 'posts'
    );

    Would this be possible somehow?

    https://wordpress.org/plugins/simple-ga-ranking/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple GA Ranking
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic