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

Post titles and thumbnails as links to custom post types?

Something like this should solve your problem… <?php $pfportfolio = new WP_Query( array(‘post_type’=>’portfolio’, ‘posts_per_page’=>-1) ); ?> <?php if ( $pfportfolio->have_posts() ): ?> <ul class=”thumbnails”> <?php while ( $pfportfolio->have_posts() ) : $pfportfolio->the_post(); ?> <li class=”span4″ data-id=”post-<?php echo esc_attr(get_the_ID()); ?>” data-type=”<?php echo esc_attr(strip_tags( get_the_term_list( $post->ID, ‘location’, ”, ‘ ‘, ” ) ) ); ?>”> <a href=”https://wordpress.stackexchange.com/questions/108357/<?php the_permalink(); … Read more

Inconsistent title for posts

There is actually nothing you can do about this. Google changed their algorithm a few months ago where they will sometimes determine the title in their results if they feel it’s a better fit. I noticed this when working on the SEO for the last company I worked for. When searching “channel letters detroit” the … Read more

How to set “lang” attribute for post/page title?

There is a the_title filter. You should be able to wrap the title in a <span> using that. add_filter( ‘the_title’, function($title) { return ‘<span lang=”ur”>’.$title.'</span>’; } ); A version compatible with an older PHP: function lang_attr_wpse_116733($title) { return ‘<span lang=”ur”>’.$title.'</span>’; } add_filter(‘the_title’,’lang_attr_wpse_116733′); If it were me, I’d add a checkbox on the post edit screen … Read more