WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks Help Documentation Needs Help (2 posts)

  1. jaseinatl@gmail.com
    Member
    Posted 1 year ago #

    http://codex.wordpress.org/Using_Permalinks#Structure_Tags

    It is completely unclear when you are using a string literal and when you are using a variable name.

    Is the term "category" a string literal in the variable category_base or is it just an example of how you could setup category_base...

    In other words, I would like my nested category heirarchie to be represented as directories in my url such that every time I select "Apples" (a sub-category of "Fruit"), my url looks literally like this:

    http://mydomain.com/fruit/apples/why-i-love-them

    or

    http://mydomain.com/fruit/apples?p=150

    and I cannot decide how to setup my permalinks to handle that. I have read the page a dozen times, but it is not clear. Do you mean that if I select "custom structure" and enter /category/ that it will prepend the string literal "category" before my post (id or name)?

    do I put /%category%/%postname% if I want the variable %category% to replaced by my categorical hierarchy and the variable %postname% to be replaced by the post slug?

    My suggestion is that you use COLOR to identify VARIABLES or CONDITIONALS. So I would know, immediately, that anything I see with VIOLET colored text would be replaced by a Variable Value and anything that is LIME colored text would be the Literal value.

    This way, when you wanted to indicate that you could change the way the word <color=lime>category</color> appears in the following url:

    http://wp.com/<color=lime>category</color>/<color=violet>my-post-slug</color&gt; you would understand that setting a custom <color=violet>category_base</color> value to <color=lime>cats</color> would clearly give you

    http://wp.com/<color=lime>cats</color>/<color=violet>my-post-slug</color&gt;

    or if the variable for <color=violet>my-post-slug</color> was the string literal <color=lime>Alphie</color> your url would like like:
    http://wp.com/<color=lime>cats</color>/<color=lime>Alphie</color&gt;

    If I am not making sense, please let me know. Because I cannot figure out how I should configure my permalinks to allow the hierarchical directory structure "pretty" format.

    Thanks in advance,

    Jase

    p.s. I realize that my <color> tags most likely will not change the text color of this post, they are used to clearly indicate colors in lieue of having the ability to do so in the forum text editor.

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    My suggestion is that you use COLOR to identify VARIABLES or CONDITIONALS.

    That is such a bad idea. 10% of the male population is colour-blind!.

Topic Closed

This topic has been closed to new replies.

About this Topic