• Resolved thescarletfire

    (@thescarletfire)


    Hello,

    I am trying to get WordPress to hide author, date, and the “bookmark the permalink” – but ONLY in posts of a certain category. I know how to do a universal site-side change of this, but I don’t want to hide this data from other blog posts and categories, just a particular category.

    Is this possible? Can you please tell me what code I’d need to adjust for this? Thank you so much. I can’t complete my job here unless I solve this…

Viewing 15 replies - 16 through 30 (of 49 total)
  • haha ??
    as i said it was just a reference guide
    #author and #time r no id/classes

    i just gave you a syntax
    you have to see which classes/ ids r being used in your code

    Thread Starter thescarletfire

    (@thescarletfire)

    Doh! Epic fail – gotcha – I’m on it…. ?? Thanks!

    Checking out the CSS now…

    Thread Starter thescarletfire

    (@thescarletfire)

    I only see .entry-author (span) as being how the CSS is stying the post author, etc.

    I modified the code with the class but it’s still not working.

    Is there any way to dig deeper and find the #ID I need to input in the functions file?

    I am using Google Chrome Dev tools, I prefer it vs. FireBug ??

    Thanks!

    Thread Starter thescarletfire

    (@thescarletfire)

    Success!
    (sort of lol)

    I entered this in the functions file:

    function jl_remove_post_dates() {
    add_filter(‘the_date’, ‘__return_false’);
    add_filter(‘the_time’, ‘__return_false’);
    add_filter(‘the_modified_date’, ‘__return_false’);
    add_filter(‘get_the_date’, ‘__return_false’);
    add_filter(‘get_the_time’, ‘__return_false’);
    add_filter(‘get_the_modified_date’, ‘__return_false’);
    } add_action(‘loop_start’, ‘jl_remove_post_dates’);

    But it removed the date from ALL posts, regardless of category. Before you leave me, can you just help me fit in your conditional code so my above function will ONLY hide date on Category ID=23?

    Thank you SO much! ??

    i would have to see your site to see which classes are working on it

    not sure but you might try calling this function inside the conditional loop

    Thread Starter thescarletfire

    (@thescarletfire)

    Hmm..I really can’t figure this out.

    I’ll be happy if I can just at least remove the date and “bookmark to permalink” text from ALL posts in a particular category – not all posts in all categories.

    Any chance you, or another kind soul can please help me out with this?

    Thank you again.

    it would be good if you could post your link

    Thread Starter thescarletfire

    (@thescarletfire)

    Well my site is currently offline (Maintenance Mode) – is there a way to let you ‘see’ my FTP files without being able to destroy them? ?? Read only?

    Thanks!

    I mean, I guess I could add you to the blog as a user, temporarily – yes?

    Thread Starter thescarletfire

    (@thescarletfire)

    I’ll just make my site online for like 10 mins or so – and you can grab/look at whatever files you need to…gimme one minute ?? Thanks!

    cool

    Thread Starter thescarletfire

    (@thescarletfire)

    Ok, so a few things –

    First, seriously – THANK YOU. You are seriously saving my job. I’m the webmaster for this website and I recently took it over – I have a strict deadline of this weekend…

    Second, please note that the ultimate goal here is to hide/remove certain text from the single posts AND the category’s ‘main’ page – not just one location, but both. I have included screenshots to show you the parent category page, and the post in that category – I need the text to be gone from both locations.

    Finally, if there is anything I can do to show my appreciation, please let me know. I can’t thank you enough….here is the website data:
    (I just recently took over so bear with me, I’m still learning the code here)

    First, images to help you see my goal:
    Image 1 – This shows the Category’s MAIN page, which displays all posts within that category (Category name = Compositions).
    https://i.minus.com/jbzFbcceOfuWOU.jpg

    Image 2 – This shows the individual post WITHIN the Compositions category – all highlighted text, I would like to be hidden.
    https://i.minus.com/jVY5aoVz0Lkfc.jpg

    The website is:
    https://www.benjamincl.com

    Please, if you could help me tonight that would be awesome (it’s 9PM EST here) – my boss would kill me if he knew the site was live online now lol – thanks again…I look forward to your help…

    Thank you,
    Ben

    ha time differences ?? its 1PM in new zealand

    ok in the original code i gave you
    <?php
    if (is_category(23) )
    {
    echo ‘ <style>
    .entry-date {
    display:none;
    }
    </style>’;
    }
    ?>

    Thread Starter thescarletfire

    (@thescarletfire)

    FYI:

    I went to school with the guy who owns this site – we’re both named Ben….we hung out all the time, and were known as the Bens ??

    Thanks again for the help!

    if (is_category(23) )
    {
    echo ' <style>
    .entry-date {
    display:none !important;
    }
    .entry-author{
    display:none !important;
    }
    .entry-cats{
    display:none !important;
    }
    entry-permalink{
    display:none !important;
    }
    </style>';
    }
    ?>
    Thread Starter thescarletfire

    (@thescarletfire)

    I’ve tried the code but it doesn’t work.

    What about the ?> at the end of it?

Viewing 15 replies - 16 through 30 (of 49 total)
  • The topic ‘Hide Post Author & Date – specific issue…’ is closed to new replies.