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

How do I remove ‘Home’ from homepage title?

You can add a check to see if the current page is the home page, and if so skip adding the page title. This would make the final code look like this: <title><?php global $page, $paged; // Add the page title if not the front page if ( is_front_page() ) { wp_title( ‘|’, true, ‘right’ … Read more

Why would apply_filters return a non-empty string, when the value returned is empty?

The problem is in the theme you’re using. This has been reported before: https://core.trac.wordpress.org/ticket/21430 Seems that Elegant Themes don’t like their widgets to not have titles. So they have a function called “et_widget_force_title” which changes blank titles into titles with a single space. In case of doubt, always try disabling plugins and switching to the … Read more

Text under post title on frontpage but don’t want it in full post

Tested this and it worked perfectly on Genesis. You can also use HTML tags in the custom field. add_action( ‘genesis_entry_header’, ‘content_after_archive_title’, 15 ); function content_after_archive_title() { if ( is_home() && genesis_get_custom_field(‘after-title’) ) : echo ‘<div class=”after-title”>’. genesis_get_custom_field(‘after-title’) .'</div>’; endif; } Uses the native custom fields meta box which you can reposition under the Editor. You … Read more

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