Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Ben Meredith

    (@benmeredithgmailcom)

    Hey Belsit,

    Thanks for reaching out. I’m not sure I totally understand what you are trying to do. Are you saying that the plugin is not currently working?

    If the date is being output in a div or span with a class or ID, it is hideable. (you can check the CSS file bundled in the plugin to see exactly what that div/span class/ID needs to be.)

    Can you send along a link to your site, so I can see better what you are trying to do?

    I don’t have any pre-written code snippets. The plugin is designed to just work!

    Thread Starter belsit

    (@belsit)

    Hi Ben,

    “Are you saying that the plugin is not currently working?” –> Well yes, that is basically what I am saying.

    But also, the theme I use displays the date at the homepage, the single post, related posts, etc. So in multiple places. And what I understand from the plugin description is that the plugin only targets the single posts. Correct?

    Your plugin does not remove the date in the post itself with the theme I use. And obviously not at the other areas, as that is not what it is programmed to do.

    So my thought is to skim the code pages of the theme and where ever I find a “post date” code snippet, to replace that with another code snippet (related to the plugin) that either posts the date, or not, dependent on the #days as defined in the plugin.

    Does that make sense? If there is a better or easier way of accomplishing that, I don’t mind hearing that.

    Plugin Author Ben Meredith

    (@benmeredithgmailcom)

    I see.

    No, unfortunately it is a limitation of how WordPress core handles dates for archive pages, that they only output one date for the entire archive page. And some themes use the most recent post for that date, while others use the oldest post for that date. Either way, the best my plugin could do would be to remove the date from ALL posts in a certain archive page.

    I can figure out how to make my plugin work on single posts on your theme if you’d like. But to dynamically remove the date from archive pages is well beyond the ability of this plugin. I’m sure it can be done, but it’d be a totally new plugin (mine basically hacks the CSS on your theme).

    Thread Starter belsit

    (@belsit)

    “I can figure out how to make my plugin work on single posts on your theme if you’d like.” –> Okay. Please let me know what you need to know and how I can provide it to you.

    Plugin Author Ben Meredith

    (@benmeredithgmailcom)

    Can you send along a link to your site (specifically to a post that you’d expect the date to disappear from based on the settings for my plugin)

    I’ll check it out!

    Thanks!

    Thread Starter belsit

    (@belsit)

    For instance this post:
    https://pixoboo.com/welcome-back-snowbirds/
    is 7 days old, and the plugin is set to 3 days.

    Thank you.

    Plugin Author Ben Meredith

    (@benmeredithgmailcom)

    The plugin is loading the stylesheet correctly, so that’s good news. (Line 232 of the source code for that page has the css file loading correctly.)

    Unfortunately, the theme doesn’t put the date in the same span as the vertical bar before or after it, so I can’t modify my plugin to hide date and one of the bars. The fix is to modify your theme files, specifically single.php and to wrap both the date and the “|” after it in a span with the class “post-date.”

    Line 15 in single.php currently looks like this: <div class="post-info"><span class="theauthor"><?php the_author_posts_link(); ?></span> | <span class="thetime"><?php the_time( get_option( 'date_format' ) ); ?></span> | <span class="thecategory"><?php the_category(', ') ?></span> | <span class="thecomment"><a href="<?php comments_link(); ?>"><?php comments_number();?></a></span></div>

    You should modify it to look like this: <div class="post-info"><span class="theauthor"><?php the_author_posts_link(); ?></span> <span class="thetime post-date"><?php the_time( get_option( 'date_format' ) ); ?></span> | <span class="thecategory"><?php the_category(', ') ?></span> | <span class="thecomment"><a href="<?php comments_link(); ?>"><?php comments_number();?></a></span></div>

    Never modify theme files from within the dashboard area, always use a text editor and FTP. Also, the best way to do this is always using a child theme, so that customization of the theme is not overwritten by updates.

    Let me know if you need any more help!

    Ben

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Date still showing’ is closed to new replies.