- This topic has 14 replies, 3 voices, and was last updated 6 months, 2 weeks ago by
David.
-
AuthorPosts
-
July 9, 2020 at 1:53 am #1357540
Stephane
Hello
Do you know how to insert at the end of each posts:
[wp_show_posts id=”20502″]<p><!– Using the Simple List –></p>
Regards,
Stef
July 9, 2020 at 3:31 am #1357643David
StaffCustomer SupportHi there,
you can add shortcodes to a Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/
The
after_main_content
hook places it below the posts content. You can see hook positions here:https://docs.generatepress.com/article/hooks-visual-guide/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 9, 2020 at 4:35 am #1357721Stephane
July 9, 2020 at 4:44 am #1357730David
StaffCustomer SupportWith the Dispatch site you need to wrap your code like so:
<div class="wpsp-card"> <!-- add your function here --> </div>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 9, 2020 at 4:58 am #1357758Stephane
Nothing display with:
<hr ><?php if ( function_exists( ‘wpsp_display’ ) ) wpsp_display( 20502 ); ?>July 9, 2020 at 6:54 am #1357877David
StaffCustomer SupportTry this code – making sure your WPSP lists ID is
20502
<div class="wpsp-card"> <?php if ( function_exists( 'wpsp_display' ) ) wpsp_display( 20502 ); ?> </div>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 9, 2020 at 8:12 am #1358095Stephane
The ID is ok. It works with
<div> <?php if ( function_exists( 'wpsp_display' ) ) wpsp_display( 20502 ); ?> </div>
but not with the class
<div class="wpsp-card"> <?php if ( function_exists( 'wpsp_display' ) ) wpsp_display( 20502 ); ?> </div>
July 9, 2020 at 8:26 am #1358114David
StaffCustomer SupportCan you disable autoptimize
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 9, 2020 at 8:35 am #1358127Stephane
I tried without results
July 9, 2020 at 8:50 am #1358147Stephane
It works with the default wp_show_posts:
<div class="wpsp-card">[wp_show_posts name="Simple"]</div> <p><!-- Using the Simple List --></p>
I’m going to use it.
July 9, 2020 at 8:51 am #1358148David
StaffCustomer SupportYeah – i don’t think it likes the function. Shortcode is good 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 9, 2020 at 9:07 am #1358173Stephane
In fact, even if I used the default [wp_show_posts name=”Simple”], it doesn’t work well.
1. Ok with category, no display with post_tag
2. I select the last posts (date > descending) in the category, but it displays other results.July 9, 2020 at 2:02 pm #1358401Tom
Lead DeveloperLead DeveloperHi there,
Can you explain a bit more about what isn’t working, exactly? The card styles, or something about the posts being queried?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 10, 2020 at 1:55 am #1358758Stephane
Hi Tom,
In fact, I think the mistake was mine. It’s all right.
Thanks for your help
Stef
July 10, 2020 at 12:26 pm #1359466David
StaffCustomer SupportGlad to hear you got it working!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.