• Resolved michaelwillow

    (@michaelwillow)


    I found a couple of solutions but nothing seems to work out. Most of them ask me to change a code but the code they give me to change does not exist in my php index.

    A couple of times I messed up my profile, making it not visible full of errors so I don’t wanna risk other solutions.

    Here is mine

    What do I have to change?

    <?php get_header(); ?>
    <div id=”content”>

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <div id=”title_back”>
    <div class=”post-date”><span class=”post-month”><?php the_time(‘M’) ?></span> <span class=”post-day”><?php the_time(‘d’) ?></span></div>
    <div class=”post-title”>

    <h2>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>
    <span class=”post_arr”> Posted by: <?php the_author() ?> in <?php the_category(‘, ‘) ?></span> <span class=”post_arr2″><?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?></span>
    </div>
    </div>
    <div class=”entry”>
    <?php the_content(‘Read the rest of this entry »’); ?>
    </div>
    </div>
    <!–/post –>

    <?php endwhile; ?>

    <div class=”navigation”>
    <span class=”previous-entries”><?php next_posts_link(‘Previous Entries’) ?></span> <span class=”next-entries”><?php previous_posts_link(‘Next Entries’) ?></span>
    </div>

    <?php else : ?>

    <h2>Not Found</h2>
    <p>Sorry, but you are looking for something that isn’t here.</p>

    <?php endif; ?>

    </div><!–/content –>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    Is it possible to find a plug in instead because it really scares me working with php.

    Sorry for that huge code…

Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    What exactly are you trying to do here? I’m somewhat confused.

    Thread Starter michaelwillow

    (@michaelwillow)

    Sorry…

    I am trying to remove the date from the sticky post
    https://michaelwillow.com/

    The code above is a copy of my php index so I have to change something there but I donno what…

    I have seen some solutions. Some users say “in your php index file change this code to another” … what code? I can’t find exactly the same they show and when I tried to edit it I messed up my profile… total nightmare to change it back, so I post exactly what I see in this file in order someone to give me an idea. I hope it is more understandable now. Sorry but I have spent a lot of days trying to figure it out and no results.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Ahh. Okay, well first you need to make the code specify what posts are “sticky” or not. Fortunately, WordPress makes this easy:

    Change this line:
    <div class="post" id="post-<?php the_ID(); ?>">

    To this:
    <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">

    That post_class function adds lots of new classes to your post div. One of those classes is “sticky”, which you can then use as a style to hide anything you like.

    So next, in your theme’s style.css file, we eliminate the date section from the sticky post only:

    .sticky .post-date {
    visibility: hidden;
    }

    And voila.

    Thread Starter michaelwillow

    (@michaelwillow)

    Done the first but I can’t find this code

    .sticky .post-date {
    visibility: hidden;
    }

    to the sheet css

    Should I put it somwhere

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Yes, you need to add that to the stylesheet. It’s not in there already.

    Also, you messed up something somewhere, as right now your site is returning an error in your functions.php file.

    Thread Starter michaelwillow

    (@michaelwillow)

    I did that I added this code to the stylesheet but I can’t go back to the editor. Once I click to the editor it gives me the error

    Thread Starter michaelwillow

    (@michaelwillow)

    I can’t even log out!!!

    Thread Starter michaelwillow

    (@michaelwillow)

    My site is locked up… what can I do now

    Thread Starter michaelwillow

    (@michaelwillow)

    At least I would appreciate if you give information that really work. Sorry but my site is totally gone as it has locked up and perhaps I have to do it again and miss the 9.000 views of the last month.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    It looks fine to me. It even appears to be working. The sticky has no issues.

    Note above where I said you had a problem in the functions.php file? That was likely preventing your site from working. I assume you fixed it. Always make sure that you’re editing the correct file. Putting bad things in live can break your site.

    Thread Starter michaelwillow

    (@michaelwillow)

    Thanks for that. I am kinda new to that and every error and problem make me feel very much frustrated.

    I need something more. How can I remove from the sticky post the “comments off”

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Trying to remove the date from the sticky post… Total nightmare’ is closed to new replies.