• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How To Capture Variable From Query String?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › How To Capture Variable From Query String?

This topic is: not resolved
  • This topic has 2 replies, 2 voices, and was last updated 10 years, 11 months ago by anotherusername.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • May 30, 2015 at 2:42 pm #154217
    anotherusername
    Participant

    How do I capture and display a variable from a query string in the page title and text of a page?

    suppose I want to capture a city name passed through the URL.

    If I am using permalinks like this:

    http://www.example.com/my-page/

    1) How should I append the city name to the page URL?

    2) What will I need to capture that variable?

    2-A) Will I need to "register" that variable? If so, how?

    3) what will I need to display that variable in the title and in the body of the text?

    4) I won't be writing this variable to a database - just displaying it when the page is called. Are there any special security steps I need to take?

    Thanks in advance.

    May 31, 2015 at 6:18 am #154252
    Ben @ Inbound Creative
    Member

    This is well beyond the scope of the StudioPress forums. You'd be better off asking this on something like Stack Overflow.


    Award winning web design in Liverpool | UK based Genesis Framework web designer and developer

    May 31, 2015 at 12:42 pm #154291
    anotherusername
    Participant

    My concern is that there would be a "wordpress way" to do it and a seperate built-in "genesis way" to do it.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble