user image

Shilpa
Published in : 2022-02-26

Way to disable Block URLs for WordPress Posts

Wordpress

On my homepage of the WordPress website, a number of posts are listed already, but I don't want to let the user browse posts from the list.

How can I hide or disable or not let the user browse such blog posts?

Comments

Shilpa Date : 2022-02-26

Best answers

10

Best answers

10

I was looking for the solution and I found a workaround. (I am curious to share what I did!)

 

While inspecting the HTML elements, I saw linkclass which was added in all of the posts by default. You can add below code snippet for that.

.linkclass {point-events: none; // it will work as disabled: true HTML Attribure}

Using this, visitors can't browse or navigate to see more posts.

Rakshit Date : 2022-02-27

Best answers

34

Best answers

34

You can achieve it by the below code,

[aria-current="page"] { cursor: default; pointer-events: none; color: green; cursor: default;}
<a href="index.html" aria-current="page">Post 1 link</a>

You can check the live demo on fiddle.

Leave a comment

Join us

Join our community and get the chance to solve your code issues & share your opinion with us

Sign up Now

Related posts

How to run wordpress with different themes in main domain and subdomain?
Publish date: 2022-03-01 | Comments: 1

Tag: Wordpress

Will Google Dorking save my secure WordPress website running on HTTPS?
Publish date: 2022-02-26 | Comments: 1

Tag: Wordpress

Wordpress update button returns 404 [SOLVED]
Publish date: 2021-06-26 | Comments: 2

Tag: Wordpress

How to display tags on each posts for customized wordpress theme?
Publish date: 2022-02-26 | Comments: 1

Tag: Wordpress

[solved] undefined $post->ID in WP_Query()
Publish date: 2022-01-30 | Comments: 2

Tag: Wordpress

What is the best reference to the most used WordPress functions?
Publish date: 2022-02-09 | Comments: 2

Tag: Wordpress

Cpanel to Webmin migration 503 error
Publish date: 2021-08-12 | Comments: 4

Tag: Wordpress