Answer the question
In order to leave comments, you need to log in
How to specify a rubric as a floating variable in a loop?
In any cycle of any kind, we specify a rubric or an ID or a slug, etc. Is there a way to specify so that with any change in the parameters of the rubric, whether it be a slug or an ID, these parameters also change in the cycle?
Answer the question
In order to leave comments, you need to log in
If we are talking about the fact that in your cycle the binding goes to the slug or category id, then the situation is as follows.
If the binding is to an id, then until you delete the rubric in the admin panel, everything will be ok, but if the binding is to a slug, then there may be problems, since it can be corrected.
If you change the id, for example, you deleted the category and created it again, then the logic inside the code may break if you hardcoded the id there with a number.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question