Print posts category or tag as a formatted journal

You don’t have to use a specific plugin to achieve columns in print, you can modify how your layout looks when printing using the print CSS media query. You can learn more about this topic here. In case of the WP Journal plugin to print 3 columns of text add this: @media print { .cols3 … Read more

check uncategorized category by default

It doesn’t need to be checked to work. When you publish the post, as long as you haven’t added another category and explicitly checked it, WordPress will automatically assign the Uncategorized category for you. Once you hit publish and the page refreshes you’ll see the checkbox checked.

Using wp-cli and delete everypost first image

According to the WP-CLI docs for the wp search-replace command (and wp db search, for that matter), you have to pass your search string without delimiters and pass any flags separately. Instead of: wp search-replace ‘/<img[^>]+\>/i’ ” wp_posts –regex –allow-root You would use something more like this: wp search-replace ‘<img[^>]+\>’ ” wp_posts –regex –allow-root –regex-flags=”i” … Read more

New Posts and Pages Won’t Save

More often than not this is caused by a plugin update or incompatibility. I would suggest disabling all your plugins and trying again. Then re-enable a few at a time until you find the culprit.

the_excerpt is displaying excerpts of every post

Looking at your site, the problem seems to be a little different. For every post, the excerpt of the first post is shown. And not just once, but three times. This happens only on the website, but not the RSS feed or the REST API. Since the code you provided looks fine, it seems that … Read more

How can I insert a new markup element after 4 posts automatically? [closed]

This can be achieved by accessing WP_Query class properties, available while in the loop, like $current_post (index of the current post), $post_count (number of posts displayed), $found_posts (total number of posts matching query). By using $current_post, $post_count and PHP modulo, like shown below: <?php if ( $custom_query->have_posts() ) : while ( $custom_query->have_posts() ) : $custom_query->the_post(); … Read more

singular posts using archive styling

if you are not aware of WordPress template structure. https://developer.wordpress.org/themes/template-files-section/taxonomy-templates/ https://developer.wordpress.org/themes/basics/template-hierarchy/ WordPress follow a hierarchy for post/page templates archive.php for your archive pages of post and category. single.php for your every WordPress single post. you can adjust your single.php code to make single page HTML different then archive page. In your case to separate styling … Read more