Hide or Show Read More Button by Content Area

This checks the number of characters and hide the button server-side in content.php: <?php $excerpt = get_the_excerpt(); $excerpt_length = strlen($excerpt); $excerpt_limit = 100; // Match the limit set in functions.php // only for debugging: var_dump($excerpt); var_dump($excerpt_length); ?> <div class=”news-main”> <?php the_excerpt(); ?> </div> <?php if ($excerpt_length >= $excerpt_limit) : ?> <div class=”news-read”> <a href=”<?php echo … Read more

Forming comments on WordPress blogs with TeX [closed]

WordPress doesn’t support this out the box so you’d need to know how Tex support is implemented on that blog. Looking at the raw HTML suggests tex2jax_ignore which heavily implies Mathjax is being used. A quick look at Math stack exchange suggests they’re using MathJax v2.7.5. Having said that, Stack exchange doesn’t use HTML the … Read more

browser tab showing page title twice

Edited to add Having looked at the source of wp_title(), it looks like it already checks to see if you’re on a page, a single post, a category or tag archive page, a search results page, a 404, etc. So a lot of the code is redundant; you might be able to use something like … Read more

Server setup sanity check on theme changes

It’s possible for themes to create sample content, but as far as I can tell that’s still the exception rather than the norm. It’s more typical to create at least a homepage with some dummy content including images, lists, headings, etc. Then when you switch themes, you’ll still see that content but wrapped in the … Read more

WordPress custom post_status after 6.6 version

Can you post your js or try this? import { addFilter } from ‘@wordpress/hooks’; addFilter( ‘editor.PostStatus.statuses’, ‘sq/add-custom-post-status’, // custom filter name (statuses) => { return [ …statuses, // save old statuses { // add new status slug: ‘prepare’, label: ‘Prepare’, labelShort: ‘Prepare’, public: false, }, ]; } );