Clean links in: the_author_meta(‘description’)

<?php // grab description, // note the “get_”, we’re not echoing the author meta, we’re returning it $user_description = get_the_author_meta(‘description’); // removing all HTML tags: echo strip_tags($user_description); // removing all tags apart from paragraphs: echo strip_tags($user_description,'<p>’); // removing just anchors (i.e. <a> tags): echo preg_replace(array(‘{<a[^>]*>}’,'{</a>}’),array(”,”),$user_description); // removing all links including their text (i.e. <a href=”https://wordpress.stackexchange.com/questions/33568/…”>…</a>): … Read more

Change description of my Jetpack facebook shared links [closed]

This part comes from the function comment_form() which is called by your theme, probably in comments.php: ‘comment_notes_after’ => ‘<p class=”form-allowed-tags”>’ . sprintf( __( ‘You may use these <abbr title=”HyperText Markup Language”>HTML</abbr> tags and attributes: %s’ ), ‘ <code>’ . allowed_tags() . ‘</code>’ ) . ‘</p>’, You can filter it out with a simple plugin: <?php … Read more

Display a tag only if there is a description

The object returned by get_tags() should have a description property, so you don’t need to try to get it again. Just check to be sure $tags->description isn’t empty. You should probably also reorganize so that you don’t do anything at all unless if($tags). Thus: // Get ALL the tags! $tags = get_tags( array( ‘hide_empty’ => … Read more

Change the meta description on a specific page?

The meta description isn’t part of the Twenty Fifteen theme. You mentioned the Yoast plugin in a previous question yesterday, so I guess the meta description comes from there. According to their API page, there’s a filter called wpseo_metadesc that might be what you’re looking for. Here’s an untested example: /** * Change the Yoast … Read more

How can I add an area/option for a custom page description?

A simple, easy, and quick way to add your own custom meta box to your Pages is by first installing the Meta Boxes plugin (required). Next, add the following custom code to your functions.php in your child theme: add_filter( ‘rwmb_meta_boxes’, ‘wpse_236870_meta_boxes’ ); function wpse_236870_meta_boxes( $meta_boxes ) { // Add custom meta box in ‘Pages’ $meta_boxes[] … Read more

Admin Filter – Add Post Type Description on Post Type Page

The filter views_{$this->screen->id} is fired just after the title of post edit screen has been print to screen, so it’s a safe place to just echo what you want. So you can simply do: function post_type_desc( $views ){ $screen = get_current_screen(); $post_type = get_post_type_object($screen->post_type); if ($post_type->description) { printf(‘<h4>%s</h4>’, esc_html($post_type->description)); // echo } return $views; // … Read more

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