html entities occur in the_excerpt used as meta description

I think you want to to this on singular post/page, so you don’t think to setup global post object, it is already set up. After that, the problem is that calling get_excerpt will run some filters that add html entities. This is because get_the_excerpt is intended to be used in page content (inside the <body> … Read more

making the […] clickable

Add the following piece of code just below <?php the_excerpt(); ?> inside the loop as explained in the codex Excerpt <a href=”https://wordpress.stackexchange.com/questions/130898/<?php echo get_permalink(); ?>”> Read More…</a>

Post Excerpt field only showing for default administrator

To correctly show the Excerpt meta box for Custom Post types you should use the supports property register_post_type. Supported values are as follows, and I suggest referring to the register_post_type Function Reference for more details – ‘title’ ‘editor’ (content) ‘author’ ‘thumbnail’ (featured image, current theme must also support post-thumbnails) ‘excerpt’ ‘trackbacks’ ‘custom-fields’ ‘comments’ (also will … Read more

The Excerpt gets page excerpt instead of most recent post excerpt

Your problem is that you’re using $recent_posts as your variable name. If setup_postdata() isn’t working, then your the_excerpt() should return whatever the excerpt is of the current page. From the setup_postdata() codex page: You must pass a reference to the global $post variable, otherwise functions like the_title() don’t work properly. So change this: $args = … Read more

Assign Custom classes to every Excerpt

Firstly, there are syntax errors in your (last block of) code. And secondly, you don’t need to add any specific class at all. Just use the post ID for each post: <article id=”post-<?php the_ID(); ?>”> <div class=”post-content”> <?php if (‘excerpt’ === $gantry->get(‘blog-content’, ‘content’)) : ?> <div class=”excerpt”> <?php the_excerpt(); ?> </div> <?php else : ?> … Read more

Excerpt keep stripping tags

add_filter( ‘get_the_content_limit_allowedtags’, ‘get_the_content_limit_custom_allowedtags’ ); function get_the_content_limit_custom_allowedtags() { // Add custom tags to this string return ‘<script>,<style>,<br>,<em>,<i>,<ul>,<ol>,<li>,<a>’; } You can also add this code in your functions file and customize which tags you want to allow in excerpts.

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

The excerpt suffix won’t go away

The excerpt has a maximum lenght of 55 words, so even if you try to cut your text at say 70 words, the_excerpt() will ignore that and only show 55 words. To remove[…] from the read more tag, simply find the_content() and replace it with the_content(”,FALSE,”);. You can also use the_content(‘Read more…’); to display a … Read more

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