Adding a prefix to a post title

There are probably a few ways to handle this. Here’s one way using a checkbox to enable the prefix for individual posts, and a filter on the_title to add the prefix whenever the_title() is called for those posts. 1. Add a meta box for an on/off checkbox a. Add the meta box to the post … Read more

use get_posts to get custom field data, but in one array

You can alter your foreach loop as following to get concert date and city pair in single multidimentional array as following. $concert_query = array(); $i = 0; foreach($c_query as $post) : setup_postdata($post); $concert_query[$i][‘concert_date’] = get_post_meta(get_the_ID(), ‘concert_date’, true); $concert_query[$i][‘concert_city’] = get_post_meta(get_the_ID(), ‘concert_city’, true); $i ++; endforeach; print_r($concert_query);

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