Site logo

Archived topic

WordPress Embed Link Not Centered on Page

7 replies · Started by Taylor on March 6, 2019

Viewing posts 1–8 of 8

For our blog site, I am trying to have different pages for different topics, and I am trying to decide the best way to use those pages. I would like to use blog posts for the articles/posts and link those posts to the correct pages. I am trying to do this by using the WordPress embed link when I edit a page.

The problem is the WordPress embed link looks centered when I'm editing, but on the live site everything is justified to the left. When I left justify in editing, the live site starts making columns. I just want the WordPress embed links to be center down the page.

The page I have been testing this on is the High Lifter Mud Nats page.

Hey Taylor,

This CSS should fix it:

.wp-block-embed-wordpress {
    text-align: center;
}

The fact that it's centered in the editor probably means Gutenberg centers it, but only if you include their optional CSS:

add_action( 'after_setup_theme', function() {
    add_theme_support( 'wp-block-styles' );
} );

Adding PHP: https://docs.generatepress.com/article/adding-php/

Where do I put the CSS code that should fix it? Also, do I only need the top (first) code you provided or the bottom (second) code too?

Thank you. Where do I put the #1 CSS code you provided?

Your solution fixed it! Thank you SO much!!

You're welcome :)

This archived topic is closed to new replies.