• Resolved karsten007

    (@karsten007)


    Hi bdbrown,

    yes, this works now perfect.

    Thank you very much for your great help. Maximum respect!

    But now…I have a new question. But I think it is easy for you to answer. Please take a look here:
    http://goo.gl/ZIhw2c

    On some pages I don’t want to show the date which is positioned before my name. I know I could delete the date from my page template:
    <?php the_time(get_option(‘date_format’)); ?>

    The second posibility should be using CSS with the attribute {display:none;}

    But I couldn’ figure out which classes I have to address in my sytle-sheet in order to hide the date before my name. Could you please advise me quickly?

    Thank you and have a nice weekend!

    Karsten

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi Karsten – yes, the problem is the date (and more) in the post-byline is just text so you really don’t have a way to manipulate it. What I would do is change the php code you mentioned in your page template to include a class, something like this:

    `<span class=”my-post-date”><?php the_time(get_option(‘date_format’)); ?></span>’

    Then you could easily target the class with {display:none;}.

    Thread Starter karsten007

    (@karsten007)

    Hi bdbrown,

    thank you for your advise.

    I have done so as you suggested:
    http://goo.gl/oIGQ0A

    When I use Firebug to inspect the code I can see the span class but I can not see the attribute {display:none;}. So, the date before my name is still visible. I don’t know what is wrong….

    I hope you could help.
    Thank you

    Regards,
    Karsten

    Drop this in your css; that should hide it:

    .post-byline .my-post-date {
    display: none;
    }
    Thread Starter karsten007

    (@karsten007)

    I have done so now.

    But the date is not hidden…

    On line 257 of your child theme’s stylesheet, you have an orphaned background line:

    background:url(http://www.kagels-trading.de/wp-content/uploads/2014/11/bestellung-forex-button.png) no-repeat; width:376px; height:176px; padding:0px 0 4px 0; border:none; text-indent: -1000em; cursor:pointer; margin-left: 180px;

    which is causing parsing errors in your stylesheet which causes the rule you just posted to be ignored. If you delete that line, your problem would be fixed, but do you remember what that line was supposed to do?

    Thread Starter karsten007

    (@karsten007)

    Thank you, Stephen…you got it!

    But, how did you find out the paring error? I didn’t get any error message.

    Yes, I know what the orphaned background line is supposed to do….

    Hi Karsten. I’m seeing this at the end of your child style.css file:

    #fscf_redirect4, #fscf_redirect5	{
    	margin: 30px;
    	font-size: 24px;
    	color: #008000;
    		}
    
    	background:url(http://www.kagels-trading.de/wp-content/uploads/2014/11/bestellung-forex-button.png) no-repeat; width:376px; height:176px; padding:0px 0 4px 0; border:none; text-indent: -1000em; cursor:pointer; margin-left: 180px;			
    
    .my-post-date {display: none;}

    The “background” line isn’t part of any selector so it causes the rest of the code to be ignored. If you fix or remove that line then the {display: none;} should work.

    Thread Starter karsten007

    (@karsten007)

    @bdbrown

    now the class .my-post-date works….

    Thread Starter karsten007

    (@karsten007)

    Yes, this was the “bug”. Now everything works as it should…

    Thank you very much!

    Thread Starter karsten007

    (@karsten007)

    I have removed the “background” line…it was really an orphaned line which I somehow dropped there…

    Thank you bdbrown and stephen!

    Thread Starter karsten007

    (@karsten007)

    resolved now

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘How to hide the date in post format?’ is closed to new replies.