Add delay to publish post

I think that by adding a delay you’re not really fixing the issue, you’re simply hiding it, until you grow and add more media and servers, so lsyncd will take longer, and you’ll have to increase your delay every time. Also what about updating existing posts? People might add media items and update, or add … Read more

Related Posts: Changing Function For Posts Per Page

I have gone through your code and found that the function longform_the_related_posts displays 8 related posts. This function is defined in functions.php of parent theme and called in single.php. Thus, to override the function, follow below steps – 1. Create another function that displays 4 related posts in functions.php of child theme. (As you have … Read more

How do I limit the number of posts displayed to one?

<?php query_posts(‘cat=24&posts_per_page=1’); ?> But using query_posts is a very bad idea. This is straigt from the Codex: For general post queries, use WP_Query or get_posts. It is strongly recommended that you use the pre_get_posts filter instead, and alter the main query by checking is_main_query.

Send email to author of post on post submission

The easiest way is to tie into the WordPress action publish_post. Here is a link to the codex with a basic example: https://codex.wordpress.org/Plugin_API/Action_Reference/publish_post Note: If you are looking to do this for a Custom Post Type, you’ll need to add an action for publish_custom_post_type.

Optimizing the blog loop

First of all: do not use query_posts use get_posts or new WP_Query instead. If you want to show only most viewed posts, you’ll need to add action ( for ex. wp ) check if your on single post page and update that post meta views ( +1 ). Then you could do something like these … Read more

Unabled to Change Permalinks – Even Using the “Edit” (Resets to Original Permalink on “Update”)

Thank you TheDeadMedic, I should have tried this already, but here is the answer: I had the “Slug” Meta-box hidden, using the “remove_meta_box” function because it is annoying, especially for users that aren’t tech-savvy. Unfortunately, WordPress keeps the Permalink “Edit” as if you could edit it, but it is actually necessary for the “Slug” div … Read more