WordPress Tags in class

Where are you getting these tags from? Typically, to get a list of tags attached to a post, you’d do: $some_tags = wp_get_post_tags( $post_id); and then itterate through as such: foreach($some_tags as $tag) { do stuff }

How to print partial URL after #? [closed]

First off, the “slug” is what it is by definition. There is no such thing as a “front slug”. As you do not elaborate/know on how the anchors/hashes are generated on the server side, all I can give you is a JS solution (proof of concept): if (window.location.hash) { alert(window.location.hash.substring(1)); }

Add category slug as class attribute in a link array

Ok guys found the solution myself (5 days later, oof) added below to help someone else in the future… foreach((get_the_category( $related_post->ID )) as $category) { $output .= “<a class=\”$category->slug\” href=\””.get_permalink( $related_post->ID ).”\” title=\”” . $category->cat_name . “\”>” . $category->cat_name . “</a>”; } Basically the old link above looked like this… $output .= “<a href=\””.get_permalink( $related_post->ID … Read more

Display taxonomy term slugs

You code is completely wrong. array_shift should not be used array_shift() shifts the first value of the array off and returns it, shortening the array by one element and moving everything down. All numerical array keys will be modified to start counting from zero while literal keys won’t be touched. You should have a look … Read more

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