I use WordPress’s Twenty Twenty-Four (twentytwentyfour) theme and I’m struggling to load the styles corresponding the Footer
.
I have created this Footer
pattern and have used it in many pages without issues. It’s even synced. But when I added to Footer.php
, it’s missing styling.
I have this code in my functions.php
:
function get_footer_pattern_content() {
global $wpdb;
// Fetch the footer pattern post content
$footer_post = $wpdb->get_row("SELECT * FROM wp_posts WHERE post_title = 'Footer' AND post_status = 'publish' AND post_type ='wp_template_part'");
if ($footer_post) {
return $footer_post->post_content;
}
return '';
}
And this is my single-{post_type}.php
</div><!-- #content -->
<footer id="colophon" class="site-footer">
<?php
// Fetch and render the footer pattern content
$footer_content = get_footer_pattern_content();
if ($footer_content) {
echo do_blocks($footer_content);
}
?>
</footer><!-- #colophon -->
</body>
</html>
I can’t find any styles corresponding the Footer, so I don’t even know where it’s stored. Even the pattern is stored as a wp_post
.