Solved

get var? after hashtag from url

Posted on 2014-11-20
2
176 Views
Last Modified: 2014-11-20
I used to have  a wordpress plugin that, when being used, would include a ? in the url.

I would test for that var it used, and adjust my code accordingly, to display certain things, like this:

if ( isset( $wp_query->query_vars['sample'] ) ) {

I just updated the plugin and now, instead of having a ?, then have a hashtag, and then the var I need to look for.

Apparently, my 'if' is not triggered anymore, so I'm thinking the change makes it not a query var.

So... with it as a hashtag, how can I write an if for it?

Thanks for any help,

Chris
0
Comment
Question by:St_Aug_Beach_Bum
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40456626
Anything after the hashtag is only available at the browser and is not sent back to the server.
Your only real option is, depending on the scenario, use js to get the hashtag and store it in an input, for example if you were submitting a form, so you can grab the input value at the server.
0
 

Author Comment

by:St_Aug_Beach_Bum
ID: 40456639
Ohh... bummer. Yeh, going to have to rethink this.

The plugin author has been very receptive to feedback, I'll ask her to see if she can give me a better solution.

Thank you very much!

Chris
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question