Show history of post revisions on front end

Your shortcode calls wp_list_post_revisions() which echo the output (revision list), hence you get the “updating error”. To fix the issue, you can use output buffering like so: ob_start(); wp_list_post_revisions( get_the_ID() ); $revisions = ob_get_clean(); Or you could use wp_get_post_revisions() and build the HTML list manually. Here’s an example based on the wp_list_post_revisions(): $output=””; if ( … Read more

Open Post Thumbnail in New Child Theme File in WordPress

As mentioned in the comments, neither single-thumbnail.php or single-ad.php will work in a simple manner. Sure a complex solution/workaround could be written but it’s totally unnecessary. The template hierarchy in WordPress doesn’t work that way. Whatever follows single- in a single-XXXXX.php file is used to denote the content type/post type. So the single-ad.php would only … Read more

Plugin “WP Attachments” outputs after the_content, how can I best change the location?

Without looking into the plugin, it looks like you could first remove the default placement using: remove_filter(‘the_content’, ‘wpatt_content_filter’); and then call the list function somewhere in your template like this: echo wpatt_content_filter(”); (the remove_filter would be in functions.php or somewhere near the top of your template, ie before the_content() is called.)

How to load plugin after page is loaded – pagespeed issues

I’d reach out directly to that plugin developer to relate your concerns, and if they’re not responsive consider a different plugin. But in the meantime, you can use wp_dequeue_script() and wp_dequeue_style() and their counterparts wp_enqueue_script/style to remove the stuff that’s slowing down your site. This answer has more detail on how to move scripts from … Read more

Duplicate posts when posting nulls in records in phpMyAdmin [closed]

Problem is within function query_abstract_post_table where you have ‘$ids’ wrapped in single quotes: Problem: $sql = “SELECT * FROM $table_name WHERE ID NOT IN (‘$ids’)”; In the above example, only the first ID returned in the concatenated string (from the array) will be recognized by the NOT IN clause. Solution: $sql = “SELECT * FROM … Read more

Changed permalink structure. Need help with redirecting old posts

…it redirected the old URLs to the new URLs without the end trailing slash and then redirected again with the trailing slash. So, it generated 2 redirects instead of one. RedirectMatch 301 ^/([^/]+)/([0-9]{4})/([0-9]{2})/([^/]+)/$ https://www.example.com/$4 In that case you should simply be able to append a trailing slash to the target URL in the above directive … Read more

How to find out which plugin is blocking user?

Figured it out. It was the Stop Spammer Registration plugin. The way I figured it out is I did a text search in the wordpress directory. This found one file containing some of that error’s wording. I looked up the plugin by the folder name the file was in. sudo grep -rnw ‘./’ -e ‘You … Read more