CCS remove date and author static front page

  • Unknown's avatar

    Hi all,
    Hope anyone can help me. I’ve been trying several CSS codes, but none worked so far.

    For http://www.timetotraveltoo.com, I use a static front page.
    In the blog posts itself I’ve managed to turn off the date posted and author name and they don’t appear anymore, but it still shows date and author on the static front page.

    Does anyone have a code how to hide that?

    Oh, theme I use is Penscratch 2, don’t know if that makes a difference.
    Thanks!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Also, I’m trying to change the caption colour underneath photos with this code:

    .wp-caption-text {
    font-size: 13px;
    text-align: center;
    font-style: italic;
    color: #ff007e;
    }

    Doesn’t do a thing (same goes for many other CSS codes I’ve tried. Am I in general doing something wrong?

  • Hi there,

    In the blog posts itself I’ve managed to turn off the date posted and author name and they don’t appear anymore, but it still shows date and author on the static front page.

    This is because you’re using the Recent Posts block to display posts on your front page. That block is not affected by the theme settings to hide the author and date.

    I don’t see anything else on your static front page. If you’re just going to display your posts there anyway, why don’t you just set the posts page as the front page? Then it will display the way you want without the need for any custom CSS.

    If you prefer to keep it as is, you can use this code to hide the meta info:

    /* Hide post meta for recent posts block */
    .a8c-posts-list-item__meta {
    	display: none;
    }

    Also, I’m trying to change the caption colour underneath photos with this code:

    Your code doesn’t work because you’re most likely not using the right CSS selector to target the image captions.

    Can you give a link to a specific post or page where you have an image with captions? I checked your recent posts, but the “captions” there are just regular paragraph blocks inserted below the images and galleries, not actual image captions.

    Also note your premium plan gives you access to live chat support for help with CSS questions like these: https://wordpress.com/help/contact

  • Unknown's avatar

    Thanks for answering, the code worked!

    I’ve changed the captions to regular paragraph blocks, as I didn’t know at first how to change it. But I now added a caption for the first photo if you click on this link:
    https://timetotraveltoo.com/2019/08/22/hiken-over-de-besseggen/

    Hope that’ll work for you and many thanks in advance.

  • Thanks for adding that. This CSS should do the trick:

    /* Change image caption styling for image blocks */
    [class^="wp-block-"]:not(.wp-block-gallery) figcaption {
    	font-size: 13px;
    	text-align: center;
    	font-style: italic;
    	color: #ff007e;
    }

    Note that this will only affect captions on an image added via an image block. Galleries don’t allow for a caption for the entire gallery, only individual images in the gallery, so for those I’d recommend you continue using the paragraph block styled like a caption instead.

  • Unknown's avatar

    Thank you, it worked! :)

  • The topic ‘CCS remove date and author static front page’ is closed to new replies.