Przeglądaj źródła

Clean up post meta and headers on archive pages.

Kjell Reigstad 4 lat temu
rodzic
commit
73d72302cf
2 zmienionych plików z 39 dodań i 1 usunięć
  1. 29 0
      blankie/functions.php
  2. 10 1
      blankie/style.css

+ 29 - 0
blankie/functions.php

@@ -44,6 +44,35 @@ function blankie_remove_parent_theme_features() {
 }
 add_action( 'after_setup_theme', 'blankie_remove_parent_theme_features', 10 );
 
+/**
+ * Remove Meta Footer Items.
+ */
+if ( ! function_exists( 'seedlet_entry_meta_footer' ) ) :
+	/**
+	 * Prints HTML with meta information for the categories, tags and comments.
+	 */
+	function seedlet_entry_meta_footer() {
+
+		// Edit post link.
+		edit_post_link(
+			sprintf(
+				wp_kses(
+					/* translators: %s: Name of current post. Only visible to screen readers. */
+					__( 'Edit <span class="screen-reader-text">%s</span>', 'seedlet' ),
+					array(
+						'span' => array(
+							'class' => array(),
+						),
+					)
+				),
+				get_the_title()
+			),
+			'<span class="edit-link">' . seedlet_get_icon_svg( 'edit', 16 ),
+			'</span>'
+		);
+	}
+endif;
+
 /**
  * Enqueue scripts and styles.
  */

+ 10 - 1
blankie/style.css

@@ -39,13 +39,22 @@ GNU General Public License for more details.
 }
 
 /* Remove extra margin from articles on single post pages. */
+
 .single .site-main > article,
 .page .site-main > article {
 	margin-bottom: 0;
 }
 
-/* Center-align the Site Footer */
+/* Remove the top border from the entry-footer. */
+
+.site-main > article > .entry-footer {
+	border-top-width: 0
+}
+
+/* Center-align headers and footers. */
 
+.entry-header,
+.entry-footer,
 .site-info {
 	text-align: center;
 }