Archived topic
Related Posts
11 replies · Started by Paolo Fauci on October 4, 2019
Hi,
I would like to add the posts of a category under the post, between author and footer.
So, I created a shortcode with Wp Show Post on a column
And then I created 3 columns.
Then I created Hook and copied the shortcode and only enabled a specific category.
The shortcode is placed in the right place but the layout is not correct.
The result I would like to achieve is this for Deskotop visualization in 3 columns for the 3 single images mobile
For the layout of the post I had previously created an Element layout and it is without sidebar and has a width of 760px.
I have to change Css?
Can you help me?
Thanks
Paolo
Hi there,
Any chance you can link us to the site in question?
You can edit the original topic and use the private URL field.
Let me know :)
Hi Leo,
I know several plugins for Related Post like
https://wordpress.org/plugins/custom-related-posts/#description
https://wordpress.org/plugins/yet-another-related-posts-plugin/
https://wordpress.org/plugins/related-posts-by-taxonomy/#installation
However I have already installed Wp Show Post which works well for my goal and I'm not going to install another plugin.
I know that I can insert Url at the bottom of the post or insert the shortcode of Wp Show Post but I want to insert the Related Posts after the notes of the Author.
So I ask for help to set up a 3-column grid (for Desktop) which will then change to mobile and become one above the other instead of the columns.
This is hook that I created with the short code of Wp Show Post
here is Element Hook screenshot
Image values Wp Show Post 212x115
I want Schortcode of Wp Show Post to be aligned and central and follow the layout of the Post (Post Layout is 760px)
I managed to put it under the author and before the footer but another layout follows.
I think we need to change the css but I don't know where to start.
I added url
I await your instructions
Thanks
Paolo
Can you enable right click?
Thanks!
OK done
Hard cleared my cache but still unable to use right-click.
I can use the right button and I have not deleted any cahce!
But if you need to use the Crome web master tools you can activate them from
View => Developer Options
I repeat, I unlocked the right button and I can use it
Let me know
Paolo
Yes I know how to access inspector tool - enable right-click just makes it much easier on our end for custom request like this.
Can you first wrap the shortcode like this?
<div class="grid-container wpsp-related">
WPSP Shortcode
</div>
Hi Leo
I just put the shortcode in the Div and it seems a little more central than before.
Is it possible to give the same Post Layout values (760px, with the same margins) to this Grid-container?
This schortcode has a name. Can we the Title of this Shortcode be made visible?
I wait for your instructions
Thanks
Edited the HTML here:
https://generatepress.com/forums/topic/related-posts-5/#post-1027221
Then add this CSS
.grid-container.wpsp-related {
max-width: 760px;
}
You will need to add the title of the shortcode manually above the shortcode.
Also just to mention that these aren't really GP related questions...
Hi Leo
I made the changes you reported to me.
At the beginning it didn't work and in the CSS I had an error, then I realized that it was a problem of syntax.
max-Wdith:
In
max-width
Thank you very much for your assistance
Good catch!
Glad I could help :)