Archived topic
Disappearing text when I click on it
16 replies · Started by Pete on June 8, 2020
This is strange...
The archive page shows double the text, but when I click on it the duplicate text disappears! I've never seen this. This is my Element Hook...
<p>
Andrew from <?php bloginfo( 'name' ); ?> is your local <?php single_term_title(); ?> <?php $queried_object = get_queried_object(); $this_tax = get_taxonomy( $queried_object->taxonomy ); echo $this_tax->labels->singular_name; ?> expert.
</p>
Phone, SMS, WhatsApp or try the online booking form to contact Andrew for a time to come and visit you.
after_content
https://whatsuphandyman.com.au/wp-content/uploads/Screenshot_20200609_090031_com.android.chrome.jpg
Hi there,
and does the issue go away if you remove that hooked function?
Yes, when I disable the Hook Element there is no text.
These are the only plugins I had activated and it still happens
Classic Editor
Code Snippets
Custom Post Type UI
GP Premium
I think i've fond the issue... seems to be an issue with some code and the blog columns in the customiser?
here's a screen capture video
https://drive.google.com/file/d/1bLQJthrwJtI8RyXyoe-G2WiAuQ1qF85J/view
code:
add_filter( 'generate_blog_get_column_count','tu_search_column_count' );
function tu_search_column_count( $count ) {
if ( is_search() ) {
return 33;
}
return $count;
}
the generate_blog_get_column_count filter simply changes the Column Width to 100%.
Can you temporary disable the offending hook so i can take a look at the site without it?
Done :)
When i inspect the page with and without the hook active i am seeing 2 x Posts.
The second post attracts some CSS hooked into the head of the site - it has a huge CSS selector string and is set to hide the inside-article -
here is the stripped down version
.huge-selector-string-here div.inside-article {display:none;}
However one of the CSS selectors it uses is .using-mouse which is a CSS class that gets added when a mouse is detected ie. on Click.
So questions are:
1. What is the second post there for considering its being hidden.
2. What is creating that CSS that is hiding the second post
Very good questions David! I have nooo idea
If you right click inspect the site, and look in the <head> just after this <meta name="generator" content="WordPress 5.4.2"> you will see a <style></style> you will see the huge CSS selector that is hiding the second post
I've disabled the code snippets plugin, can you have a look now?
I've enabled the hook again
Fixed it! I installed but since disabled a Page Tag plugin that allocated tags to pages. I've removed all tags form all the pages and it works... see what happens when you mess with the Wp tag universe!
Thats removed the second post - we have progress :)
Crazy CSS is still there but is now irrelevant.
Awesome - glad you found the issue :)