Archived topic
reusable block issue
7 replies · Started by liz on August 7, 2021
Hi,
I created a new WP post list image layout for a certain category, the one with a light pink background color in the homepage. I need to make another one [home page only] but with a blue color and it will contain a different category. I want it to be placed below "featured". I tried to do it on my own but I received an error message from WP. As I am afraid to crash my site, can you just do it for me? A Link to the website and login pswrd is in the private info field.
Thank you so much.
Hi there,
we can replicate the steps from the other topic:
1. Create the new WP Show Posts list. And make a note of the Shortcode it provides.
2. Edit the Page. And insert an HTML Block into the position you want your new new list displayed.
3. Copy and paste the following code into the HTML Block:
<div class="wpsp-align wpsp-align-background background-blue">
[wp_show_posts id="113"]
</div>
Replace the [wp_show_posts id="113"] with your shortcode
NOTE in the HTML I added an additional CSS Class of: background-blue
Then we just need a new CSS rule to change its background color:
.wpsp-align.wpsp-align-background.background-blue .wp-show-posts-inner {
background-color: #00f;
}
Hi!
Thank you. I know exactly how to do it , the problem is whenever I try to add a block in the exact spot where the new list should be displayed, it moves either to the top of the "standard" category or below the "simple" [category at the bottom of the page] In trying to position the block in between " featured" and "simple", I ended up receiving error message from WordPress. What could be causing this?
Some of the content is combined inside a Classic Block, which is why you cannot insert the block where you need it.
So i created a new draft page titled: Home rebuild draft
Copied over each of the elements from your Home page, and separated them into individual blocks.
Have a play with that, and preview the draft to make sure its ok and working as expected. If it is then its just a case of swapping that for your home page.
Thank you so much, David! If one day, I might want to put back the magazine grid, how should I go about it?
For reference, this article explains how the magazine grid was originally created:
However, in your site, unless other changers were made to that imported code, you 'should' only need to complete Step 5 :)
Thanks a lot, David.
You're welcome