Abid
Forum Replies Created
-
Forum: Plugins
In reply to: [UpdraftPlus: WP Backup & Migration Plugin] Save settings failsFirst, sorry for the delay.
Unfortunately, your proposed fix is not applicable for us. It’s a production site. We cannot deactivate the other plugins. In our staging site this issue does not appear.
Is there anything else we can do to resolve this issue?
Forum: Plugins
In reply to: [WP Popular Posts] How to use a post template to display in popular post listDear @hcabrera ,
I finally solved it. I had to set the global
postvariable.Sorry if I caused you any work, still thanks a lot for your awesome plugin.
If there is anything you would recommend to improve in my code, please let me know.
function my_12345_wpp_posts_html($popular_posts, $instance) { // loop the array of popular posts objects $output = '<div>'; foreach( $popular_posts as $popular_post ) { // set the global post variable global $post; $post = get_post($popular_post->id); // now render the template setup_postdata( $post ); ob_start(); get_template_part( 'entry-small' ); $post_html = ob_get_clean(); $output .= $post_html; } $output .= '</div>'; return $output; } add_filter('wpp_custom_html', 'my_12345_wpp_posts_html', 10, 2);Forum: Plugins
In reply to: [WP Popular Posts] How to use a post template to display in popular post listI can see the custom CSS being loaded here.
I have no idea where this comes from. I never made any attempts to modify the alm CSS.
I removed the custom CSS file and everything looks fine now.
Thanks a lot for helping me out!
Thanks for your quick reply!
Are you loading a custom version of the Ajax Load More stylesheet from your theme?
No we’re not using custom css.
We use this shortcode for vertical load more:
echo do_shortcode('[ajax_load_more max_pages="3" offset="' . $offset_for_rest . '" posts_per_page="10" loading_style="white" scroll="true" category__and="1" button_label="Mehr laden" button_loading_label="Laden ..."]');Sorry, you can close this question as we switched to another image compression solution in the mean time. Still thanks for helping me out.
Sorry, but the code you provided is syntactically wrong and makes no sense 😉
Only thing I got from the code is to make use of ‘the_content_feed’ hook. So I was able to solve the issue:
function gnpub_callback($content) { $content = preg_replace("/<ins.+?<\/ins>/", "", $content); $content = preg_replace("/<style.+?<\/style>/", "", $content); return $content; } add_filter('the_content_feed', 'gnpub_callback', 1, 1);Thank you! You write:
Removing the “<ins> ” tag should resolve the issue.
This tag displays an ad banner and is therefore necessary for the “non-feed” version of the page.
So I need to remove this in the CDATA parts of the feed.
Could you give any hint to me how to modify the contents of the feed generated by GN Publisher? Can it be done using a WordPress hook?
Thanks. What makes me wonder is that in the current version of the feed the only error message is:
Invalid HTML: Named entity expected. Got none.There is no mention about a style tag anymore (it had been mentioned before).
Are you sure it’s the style tag which is causing the error? If yes, please let me know how to modify the feed’s content (is it done by a wordpress hook?).
Forum: Plugins
In reply to: [Embed Privacy] Assets (Scripts, etc.) aren’t loaded… or is there a way to apply a filter so that EP is not applied to specific posts?
Forum: Plugins
In reply to: [Embed Privacy] Assets (Scripts, etc.) aren’t loadedTo ask the last question in another way: is EP capable in handling async content? If no, is there a way to disable it for selected embeds?
Forum: Plugins
In reply to: [Embed Privacy] Assets (Scripts, etc.) aren’t loadedI managed to figure out what the problem was.
Embed Privacy (EP) includes the assets if the post’s content matches one of the configured regexes (e.g.
twitter\.com).The reason why you couldn’t reproduce the issue in your test page is likely that there’s matching content outside the ticker.
The ticker plugin loads content via Ajax. Therefore EP doesn’t match anything inside the ticker content.
As a workaround I inserted a content filter which places some html comments
<!-- twitter.com -->, etc. in the content so that EP has a match and includes the assets. The overlays are now displayed correctly.But now I encounter another issue: the event listeners for the checkboxes do not work as they are initialized on
DOMContentLoaded. This doesn’t work if the content’s are inserted via Ajax.Is there any possibility to make the checkboxes work for async content?
Forum: Plugins
In reply to: [Embed Privacy] Assets (Scripts, etc.) aren’t loadedPlease ignore my last post. I accidentally made a change in class-embed-privacy.php which caused the issue.
Forum: Plugins
In reply to: [Embed Privacy] Assets (Scripts, etc.) aren’t loadedIn my staging environment I have now the situation that embed privacy assets are never included (even in posts without the ticker plugin). So it doesn’t work at all currently.
Please note that I disabling all plugins didn’t change anything about this issue.
Except from that there are no issues in the staging environment.
I put some error_log outputs in the code:
print_assetsis called.wp_enqueue_script('embed-privacy')is called either. But for any reason the assets aren’t included.Only thing I noticed is that every time a post is opened in the browser a warning appears in the logs:
[05-Dec-2023 16:16:48 UTC] PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'epiphyt\Embed_Privacy\Embed_Privacy' does not have a method '' in /Applications/MAMP/htdocs/apollo-news/wp-includes/class-wp-hook.php on line 324- This reply was modified 2 years, 6 months ago by Abid.