Target a page with query

I have those 2 pages that are created from a plugin (see the plugin https://zombify.px-lab.com/frontend-page/, just login and choose a post type, check the url):

  1. https://www.domain.com/post-create-page/?type=story
  2. https://www.domain.com/post-create-page/?type=trivia

The plugin is making use of custom post type. I have been trying to target them

if (is_page ('post-create-page')  ... )

with get_query_var by trying to pass the $qvars to add_filter( 'query_vars' but I am not sure how to do that.

Could some one help me how i could target those 2 pages? Thank you

Topic conditional-tags query conditional-content Wordpress

Category Web


I have checked at the source code and found $_GET as a solution to target them.

$type = isset($_GET["type"]) ? $_GET["type"] : 'story';


if( is_page('post-create-page') && $type=='story' ) { ....} elseif ( is_page('post-create-page') && $type=='openlist' ) {.....}


About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.