Get category url in loop

Notice: Trying to get property of non-object That’s because $cat_parents is not an object; it’s an array: $cat_parents_url = get_category_link($cat_parents->term_id); Secondly, to get just the category URL, call get_category_parents() with the second parameter set to false, like so: $get_cat_parents = rtrim(get_category_parents($last_category->term_id, false, ‘,’),’,’); $get_cat_parents would then be a list/string of category slugs and not category … Read more

My custom link works only on home page

You link to the anchor, so you have to put all link in there. And you’ve done it. But there are some additional “//” in your URL, so it’s not valid URL, so browsers may ignore some part of it. Just remove those “//” and it should work just fine.

How to change old permalink?

Well you have several options, but you definitely need to redirect the url. You can either achieve the redirection via a WordPress plugin or through your .htaccess file. If you would like to use a plugin, I would recommend “Redirection” by John Godley. It is easy to use. Just type the url you want to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)