How to pull code snippet from functionality plugin?

You’re trying to echo <?php tags, but that won’t work: they won’t be processed. Instead you need to replicate that logic in PHP statements in your function instead. Here’s a partial answer: function epf_extra_buttons( $post_ID ) { // TODO: where does $es_settings come from? $encoded_permalink = urlencode(get_the_permalink()); if ( $es_settings->share_facebook ) { echo ‘<a class=”a2a_button_facebook” … Read more

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