[Resolved] WordPress Embed Link Not Centered on Page

Home Forums Support [Resolved] WordPress Embed Link Not Centered on Page

Home Forums Support WordPress Embed Link Not Centered on Page

  • This topic has 7 replies, 2 voices, and was last updated 5 years ago by Tom.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #830929
    Taylor

    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.

    #830999
    Tom
    Lead Developer
    Lead Developer

    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/

    #831028
    Taylor

    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?

    #831034
    Tom
    Lead Developer
    Lead Developer

    CSS can be added like this: https://docs.generatepress.com/article/adding-css/

    You only need to use one of the methods. Not sure if #2 will work, but #1 will.

    #831046
    Taylor

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

    #831077
    Tom
    Lead Developer
    Lead Developer

    It can be added using one of these methods: https://docs.generatepress.com/article/adding-css/

    #831609
    Taylor

    Your solution fixed it! Thank you SO much!!

    #831667
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.