Echo post title in post

Use the_title(): function add_post_content($content) { if(!is_feed() && !is_home()) { $content = the_title( ‘<p>’, ‘</p>’, FALSE ) . $content; } return $content; } add_filter(‘the_content’, ‘add_post_content’); The first two arguments are for $vefore and $after. If a post doesn’t have a title, you get not extra markup. The last argument makes the function returning the string. Otherwise … Read more

Title don’t function as link

You need to put it inside the <h3> tags: <h3 class=”slide_title”> <a href=”https://wordpress.stackexchange.com/questions/82417/<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>”> <?php $long_title = get_the_title(); $short_title = substr( $long_title, 0, 55 ); if ( strlen( $long_title ) !== strlen( $short_title )) { echo $short_title . ‘&hellip;’; } else { echo $short_title; } ?> </a> </h3><!– .slide_title –> I’ve … Read more

Disable title link in the backend for non-admins

I believe the links below achieve what you’re looking to do when they’re combined. If you want to have administrators or just specific admin IDs excluded you could add to the if statement in the function like I have done with current_user_can function; function perm($return, $id, $new_title, $new_slug){ global $post; if($post->post_type == ‘testimonials’ && current_user_can(‘manage_options’)) … Read more

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