• Resolved viche

    (@viche)


    Hi!

    Is there a way to remove the “on” before the timestamp

    Thanks!

    View post on imgur.com

    `<div class=”wp-block-themeisle-blocks-posts-grid-post-body is-full”><p class=”wp-block-themeisle-blocks-posts-grid-post-meta”>on <time datetime=”2021-04-01T13:44:43+02:00″>2021-04-01</time> </p><h3 class=”wp-block-themeisle-blocks-posts-grid-post-title”

    • This topic was modified 3 years, 1 month ago by viche.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @viche,

    It’s not possible to do it unless you edit the code of the plugin which we don’t recommend. Or if you use JavaScript. Let me know if that’s something you’d like to do. ??

    Thread Starter viche

    (@viche)

    Thanks!

    Could you please provide me a robust Javascript solution?

    Have a nice day!

    Mat

    (@mateithemeisle)

    Hello @viche ,

    There is a CSS trick that you could use in order to remove that “on” by applying the below code into the additional CSS tab:

     .wp-block-themeisle-blocks-posts-grid-post-meta{
            visibility: hidden;
        }
      .wp-block-themeisle-blocks-posts-grid-post-meta time{
            visibility: visible;
        }

    What the above code does is hide the content of the paragraph by default whilst showing only the time element. I also have to mention that if there are more elements there, you might need to modify the last instruction to include the rest of the elements too.

    Thank you and please let us know if this worked, if not, then please provide the URL where you need this done and we’ll try to provide another solution!

    Thread Starter viche

    (@viche)

    Thanks mate!

    Why does not “display: none;” work? So the hidden item do not occupy space?

    //Viche

    Mat

    (@mateithemeisle)

    Hello @viche ,

    Thank you for your reply!

    That is actually a good question. The mentioned command will not work in this situation due to the way that the element was constructed. If you use display none in this case, it will make the entire div disappear including the elements you want to keep.

    Thank you and have an amazing day!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove “on” before timestamp’ is closed to new replies.