I have created one Static block with added below content in and I need to add social links in PWA.

<a class="footer-facebook" href="https://www.facebook.com/" target="_blank" rel="noopener">Facebook</a>

Above code is not working anyone have idea how to add URL in PWA ?


Right now there isn't just one way to set up a custom theme in PWA studio, so i'm going to show the core files as of 3.0 for an answer to the question.

In the footer file add in this code:


import CmsBlock from '../CmsBlock';

render() {
   return (
      <footer className={classes.root}>
         <CmsBlock identifiers={'cms-block-name'} />

This will pull in your cms by it's name into the react component. You can place the component anywhere inside the return statement. If you need to add styling to the component, i would recommend wrapping it and setting a className on the wrapper.

|improve this answer|||||
  • My question is how can I add Social link in static block in PWA – hweb87 Sep 20 '19 at 11:33
  • Are you looking to add a link to a cms block? you just have to log into the admin and add it there under content > blocks. Once you have created the block, you can use the code above to have the cms block show inside the footer component (you can use this same method in any other component as well) – circlesix Sep 20 '19 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.