?
Solved

get var? after hashtag from url

Posted on 2014-11-20
2
Medium Priority
?
183 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 2000 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

Technology Partners: 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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
Suggested Courses

770 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