WordPress Custom Post Type – Post Attribute: Template. Template shows up and saves on the back end, but the default theme file is being rendered

in your code: $labels = array( ‘name’ => _x( ‘Locations’, ‘info_locaiton’ ), ‘singular_name’ => _x( ‘Location’, ‘info_location’ ) ); use this: $labels = array( ‘name’ => _x( ‘Locations’, ‘info_location’ ), ‘singular_name’ => _x( ‘Location’, ‘info_location’ ) ); In $labels variable name array value has different slug. I think this can be a problem. So, you … Read more

get_the_post_thumbnail() title and alt attributes not displaying

Turns out this was caused by the following custom theme filter in functions.php. Commenting out fixed the problem. function image_alt_tags($content) { global $post; preg_match_all(‘/<img (.*?)\/>/’, $content, $images); if (!is_null($images)) { foreach($images[1] as $index => $value) { if (!preg_match(‘/alt=/’, $value)) { $new_img = str_replace(‘<img’, ‘<img alt=”‘ . get_the_title() . ‘”‘, $images[0][$index]); $content = str_replace($images[0][$index], $new_img, $content); … Read more

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