Home User profile
def
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
def
tagDiv Member

Hi

Actually Firefox with their default adblock would do as my website was not properly visible on that. For some reason it cuts tagdivi blocks on my website.

def
tagDiv Member

Hello Thanks for reply

Is this going to help with adblock filters? The page is displayed properly without adblock.

  • This reply was modified 5 years by def.
def
tagDiv Member

So basically blocks from your theme are not using any official wordpress hooks and are fully custom code? That means many plugins may not work properly.

Ok, then developer is needed (or maybe you plan to fix it in next release?). If not we will fix it on our own (for our own problem, comments number, it should be one additional line of code to apply filters). But fixing it just for our site – while other may have similar problem – is not good for others as for us (theme upgrade may delete our code).

  • This reply was modified 5 years by def.
def
tagDiv Member

Hello @Vlad S

I am not php/wp developer, but I think the simplest test would be to do a plugin like this:

/*
Plugin Name: Just a test
Plugin URI: justatest.org
Description: Just a test
Version: 1.0
Author: Just a test
Author URI: justatest.org
License: Just a test
License URI: justatest.org
*/

function return_always_123( $count, $post_id ) {
return 123;
}

add_filter( 'get_comments_number', 'return_always_123' );

?>

Install and activate it.

Now every post (in the_post or the_loop) will have 123 comments, regardless of what is stored in wp tables (so filter is applied).

The posts listed in the block (we have home page parts with the_loop but blocks as well) sections will have whatever-is-real-comments-number (so filter is not applied).

  • This reply was modified 5 years by def.
  • This reply was modified 5 years by def.
def
tagDiv Member

It is standard WordPress hook for get_comments_number() function.

Function:
https://developer.wordpress.org/reference/functions/get_comments_number/.

Hook:
https://developer.wordpress.org/reference/hooks/get_comments_number/

It looks like the Newspaper theme is not initializing something when creating home page with blocks?

If this was not tested before, could you please test it now?

  • This reply was modified 5 years by def.
def
tagDiv Member

Hello

What if i want to have sidebar visible for my readers when they read my blog, but i want to have it disable in in post edit view. Is this option possible by default so i don`t need to change it every time i publish something?

Thanks for help

Viewing 6 posts - 1 through 6 (of 6 total)