How to modify an existing meta description?

Looks like a syntax error. Change this: return( $title ); to this: return $title; EDIT Sorry; mis-read your question. I believe the question is entirely Theme-dependent. The description normally is output in the template via bloginfo( ‘description’ ). The bloginfo() function uses get_bloginfo(), which uses a simple switch, and for the description parameter, the function … Read more

Show preset taxonomy description

Assumptions: institute is the taxonomy course is the term only one course is assigned per post you want to display the course description? If so, the simplest way would be to use get_the_terms(). If your taxonomy is institute, you can do something like the following: <?php // globalize $post global $post; // Get the course … Read more

Showing image description along with embedded links below post images

When you look at the last line img_caption_shortcode(), then you can see wp_kses() stripping non allowed HTML tags there. The wp_kses_hook() function does only wrap a filter: return apply_filters( ‘pre_kses’, $string, $allowed_html, $allowed_protocols ); which allows to hook in and alter the output before wp_kses_split() finally removes the HTML tag by using preg_replace_callback with _wp_kses_split_callback() … Read more

Return post tags with description

This is how you can loop with custom taxonomy. function returnpost_tags(){ // get tags by post ID $post_ID = get_the_ID(); // here, you can add any custom tag $terms = get_the_terms( $post_ID , ‘post_tag’ ); echo ‘<ul>’; foreach ( $terms as $term ) { // The $term is an object, so we don’t need to … Read more

Add description to custom text widget and display the 5 recent post titles

You are not passing your description correctly. Really, you aren’t passing it at all. public function __construct() { parent::WP_Widget(false, $name=”Kevins Textbox”); array(‘description’ => __(‘A text widget created by Kevin Ullyott for practice in creating widgets’) ); } That ‘description’ line is creating an array but you aren’t doing anything with it. It is just floating … Read more

Get meta data from image

Image data is stored as if it were a post, or a CPT, so you can treat it like one. $album_id = get_the_id(); $img = new WP_Query(array(‘p’=>$album_id,’post_type’=>’attachment’)); var_dump($img->posts[0]->post_content); Or, a little more complicated,… $album_id = get_the_id(); $img = new WP_Query(array(‘p’=>$album_id,’post_type’=>’attachment’)); if (!empty($img->posts[0])) { var_dump($img->posts[0]->post_content); } get_the_ID will return the ID of the current post so … Read more

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