Why slash is removed after domain?
I just hit this issue as well and realised I had: define( ‘PATH_CURRENT_SITE’, ” ); in one of my configs and it should’ve been: define( ‘PATH_CURRENT_SITE’, “https://wordpress.stackexchange.com/” );
I just hit this issue as well and realised I had: define( ‘PATH_CURRENT_SITE’, ” ); in one of my configs and it should’ve been: define( ‘PATH_CURRENT_SITE’, “https://wordpress.stackexchange.com/” );
You don’t, if you need a dynamic value you have to have a server rendered block. Otherwise, if you managed to get the theme mod, it would be frozen to the value it had at save, and changing the value in the customiser would not update the blocks. So use a dynamic server rendered block … Read more
This endpoint /wp/v2/posts does not return featured image src url. It provides featured image id, that you can use to get image url by performing another REST request. Following function performs a rest request using media id and get image src url. /** * Get media url from WP REST API * * @param $media_id … Read more
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
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
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
It seems that one of your plugins has js that disabled the links. Please turn off your plugins one by one and then check.
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.)
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
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