Make first letter of my taxonomy uppercase

Build the links yourself: $terms = get_the_terms($post->ID, ‘trpropcity’); if($terms) foreach($terms as $term) echo ‘<a href=”‘.get_term_link($term, ‘trpropcity’).'”>’.ucwords(strtolower($term->name)).'</a>’;

How should I best target dynamically served content?

I think it depends on whether you want it to be unique for each of the four “highlighted” project columns on the homepage, or whether you want each “highlighted project” to be different. Does that make sense? E.g. if you just want each of the four project “columns” on the homepage to look different then … Read more

Conditional to modify query results

here is the mysql query you can use to get the result having distance less then your value. SELECT * , pm1.meta_value as latitude, pm2.meta_value as longitude , (((acos(sin(([latitude]*pi()/180)) * sin((pm1.meta_value * pi()/180)) + cos(([latitude]*pi()/180)) * cos((pm1.meta_value * pi()/180)) * cos((([longitude] – pm2.meta_value)* pi()/180))))*180/pi())*60*1.1515 ) as distance FROM wp_posts p JOIN wp_postmeta pm1 ON pm1.post_id … Read more

PHP/MySQL issues when running WP on EC2 cloud [closed]

Try logging into the mysql instance from the command line by typing in mysql -u root -p and then entering your mysql root password. If you can connect, even if it rejects your username and password, you know it’s up and running correctly. From that point you can diagnose whether it is username/password issues or … Read more

Improving a Stackoverflow “inspired” badge system to display badges in author page

get_current_user_id(); gets the current logged in user id and you need the user whos profileUrl is views so try this insted to get the right id: $author = get_user_by( ‘slug’, get_query_var( ‘author_name’ ) ); echo $author->ID;’ yep, so instead of your code try this: $author = get_user_by( ‘slug’, get_query_var( ‘author_name’ ) ); if ($author->ID > … Read more