• Resolved leepettijohn

    (@leepettijohn)


    Greetings,
    I love the simplicity of the pluging. I needed it tweaked a bit so that I know if the link showing is the same as the archive page. Here’s my edit starting at line 267

    $linkyear = get_query_var('year');
    					foreach ( (array) $results as $result ) {
    					$url = get_year_link( $result->year );
    					if ( 'post' !== $r['post_type'] ) {
    						$url = add_query_arg( 'post_type', $r['post_type'], $url );
    					}
    					$text = sprintf( '%d', $result->year );
    					if ( $r['show_post_count'] ) {
    						$r['after'] = ' (' . $result->posts . ')' . $after;
    					}
    					if ($result->year == $linkyear){$selected = true;} else $selected = false;
    					$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'], $selected);
    				}

    Thanks again and let me know if this is in the update so I don’t have to make a manual change. Ciao.

    • This topic was modified 5 years, 1 month ago by leepettijohn.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor twinpictures

    (@twinpictures)

    woha… a request and an offered solution?!
    sir. thank you.

    we’ll look into this and post our results first to github, and after a bit of testing here on the WordPress plugin repo.

    Stay tuned for a progress updated.

    Plugin Contributor twinpictures

    (@twinpictures)

    How exactly is this being used on the site? As a shortcode or sidebar widget? Classic or Gutenberg block, or some kind of page builder? There is a more advanced feature that can highlight current or active year in the pro version.

    Happy to add the above to the next version, but want to ensure it’s the most flexible solution for you.

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

The topic ‘Updated a bit’ is closed to new replies.