• This might sound confusing but..
    I have several different sliders that all work and pull correctly if the category name is one word, example: “Featured”. But if I name a category two words such as: “Another Featured” they all stop working. I have even made sure the slug is all one word, example: “anotherfeatured”. I have checked all my scripts and it seems to be the way I might have coded the category parameters. Would someone be willing to look at my code at:

    pastebin.com/vDc7ekcZ

    and see where I am going wrong? I have tried using the slug in the code but it did’nt seem to work. There has to be a way? Or am I stuck with using one word titled categories?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter empfx

    (@empfx)

    Is there anyway with my above code that someone could see me using the category nicename to pull from? My syntax is not great if anyone could lend a helping eye.

    Thread Starter empfx

    (@empfx)

    I think I have narrowed it down to adding a function to handle the special characters in a category name, such as white space, “&”, “*” etc.
    but still getting errors with category names with more than one word.
    Anyone?

    $mx_categories_obj = get_categories('hide_empty=0');
    $mx_categories = array();
    foreach ($mx_categories_obj as $mx_cat) {
    	$mx_categories[$mx_cat->cat_ID] = $mx_cat->cat_name;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sliders won't pull from Categories with space in a name please help’ is closed to new replies.