Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter racecar333

    (@racecar333)

    @uxl Thanks for the help!

    Yes, the link renders as expected when viewing the full content on the single post as you’re saying, but isn’t rendering when using the Gutenberg blocks Query Loop and Post Excerpt.

    Writing a manually created excerpt “works”, following these steps in the Gutenberg post editor —

    • click the three vertical dots on the paragraph block, select “Edit as HTML”, and Ctrl+C copy the HTML code
    • in the right column, select “Post” scroll down to the Excerpt section, and Ctrl+V paste the HTML code

    ^^ for example — <p>testing testing <a href="https://www.google.com" target="_blank">https://www.google.com</a></p>

    The link then renders as expected on both the full content on the single post (rendered from the Gutenberg paragraph block), and on a page when using Query Loop and Post Excerpt (rendered from the Excerpt manual entry).

    This of course doesn’t follow the DRY principle (“don’t repeat yourself”), and is a bit annoying but “works”.

    I’m surprised there aren’t multitudes of people simply wanting to render a hyperlink when using Query Loop and Post Excerpt lol.

    • This reply was modified 2 years, 10 months ago by racecar333. Reason: improved formatting
    • This reply was modified 2 years, 10 months ago by racecar333.
    Thread Starter racecar333

    (@racecar333)

    I found this sanitization happening in general-featured-posts.php

    <!-- wp:paragraph {"style":{"typography":{"textTransform":"uppercase"}}} -->
    <p style="text-transform:uppercase">' . esc_html__( 'Latest posts', 'twentytwentytwo' ) . '</p>
    <!-- /wp:paragraph -->

    …but I’m not sure what to replace usage of esc_html__ with (or if this is even the right file to edit).

    See https://developer.www.ads-software.com/reference/functions/esc_html__/ for reference.

    • This reply was modified 2 years, 10 months ago by racecar333.
Viewing 2 replies - 1 through 2 (of 2 total)