5

I have a question regarding my question being flagged for being off topic. I was asking where I should put a piece of code into my wordpress theme, and it was locked for generic code. I was not looking for help with the code rather where I should place the code for my own knowledge.

Weekly background code not working

This was my question. If I could be given advice how to reword it so it will fit with the required topic, I will appreciate it. Thank you very much.

3
  • Even though the question was put as "off-topic", I did manage to get the solution you were looking for, did my answer help? Commented Sep 14, 2016 at 1:57
  • Oh yes, yes it did. I'm sorry I didn't reply earlier, I been very busy with work. Thank you very much!
    – user102602
    Commented Sep 14, 2016 at 2:53
  • 2
    Glad it helped. Be sure to click the checkmark next to the question to indicate that your answer is resolved. Commented Sep 14, 2016 at 3:02

2 Answers 2

10

There are some "red flags" of sorts in your question:

"not working" — you are omitting essential parts of almost any question like what did you expect to happen and what actually happen. "not working" reads as "you figure it out for me".

Don't just drop generic statement like this, describe in detail what happens and what you have issue with.

give me step by step — this is falls on a wrong side of "teaching to fish / giving a fish". The purpose of this site is collecting knowledge, that you and others will benefit from.

If you focus on requesting your specific problem solved you are sending a message you are not here to learn, you just need someone to solve your problem [for free].

the code is below — is tricky one. Code is hard to read, always. For some questions it's essential. But it is hard to grasp what is the actual issue (if any) with your code. Does it break? Does it error? Does it do something different from what you expect?

If you include code in your question do a minimal amount of it and be very clear what in code is the issue.

As a result of above you actual question of where to put code was obscured by these.

How would I word such a question? My plan would probably be following:

  1. I am developing a theme and trying to achieve following functionality...
  2. My current attempt is following approach/code... [and I am facing following issues making it work: ...]
  3. I'd like to know [if approach makes sense and] how to properly integrate this in WordPress...
5

The problem with you saying "this code is not working", which for most people will mean that you have problem with the code itself and since JS question are off-topic your question is off-topic.

Asking good questions is an art. You should remember that most people will not give it more then 10 seconds to read it so you need to be as clear as possible what is it that you are asking about. In this case what you wanted to know actually conflicts with the title of the question.

Always make the actual question clear, and try to use a title that is as close as possible to it or at least provide context. Add context to the question, but word it in such a way that it is clear it is the context and not the question.

Simple style guide - the question needs to be in the last paragraph of the "question"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .