edit_post_link example

            // Check if there is a parent, then add the published in link.             if ( wp_get_post_parent_id( $post ) ) {
                echo '<span class="posted-on">';
                printf(
                    /* translators: %s: Parent post. */
                    esc_html__( 'Published in %s', 'twentytwentyone' ),
                    '<a href="' . esc_url( get_the_permalink( wp_get_post_parent_id( $post ) ) ) . '">' . esc_html( get_the_title( wp_get_post_parent_id( $post ) ) ) . '</a>'
                );
                echo '</span>';
            } else {
                // Edit post link.                 edit_post_link(
                    sprintf(
                        /* translators: %s: Post title. Only visible to screen readers. */
                        esc_html__( 'Edit %s', 'twentytwentyone' ),
                        '<span class="screen-reader-text">' . get_the_title() . '</span>'
                    ),
                    '<span class="edit-link">',
                    '</span>'
                );
            }

            // Retrieve attachment metadata.
'after'    => '</nav>',
                /* translators: %: Page number. */
                'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ),
            )
        );
        ?> </div><!-- .entry-content --> <?php if ( get_edit_post_link() ) : ?> <footer class="entry-footer default-max-width"> <?php             edit_post_link(
                sprintf(
                    /* translators: %s: Post title. Only visible to screen readers. */
                    esc_html__( 'Edit %s', 'twentytwentyone' ),
                    '<span class="screen-reader-text">' . get_the_title() . '</span>'
                ),
                '<span class="edit-link">',
                '</span>'
            );
            ?> </footer><!-- .entry-footer --> <?php endif; ?>


            $post_format = get_post_format();
            if ( 'aside' === $post_format || 'status' === $post_format ) {
                echo '<p><a href="' . esc_url( get_permalink() ) . '">' . twenty_twenty_one_continue_reading_text() . '</a></p>'; // phpcs:ignore WordPress.Security.EscapeOutput             }

            // Posted on.             twenty_twenty_one_posted_on();

            // Edit post link.             edit_post_link(
                sprintf(
                    /* translators: %s: Post title. Only visible to screen readers. */
                    esc_html__( 'Edit %s', 'twentytwentyone' ),
                    '<span class="screen-reader-text">' . get_the_title() . '</span>'
                ),
                '<span class="edit-link">',
                '</span><br>'
            );

            if ( has_category() || has_tag() ) {

                
Home | Imprint | This part of the site doesn't use cookies.