Community Forums › Forums › Archived Forums › General Discussion › Getting shortcode to render on blog page | Academy Pro
Tagged: academy pro, blog page, Soliloquy Slider
- This topic has 9 replies, 3 voices, and was last updated 6 years, 6 months ago by JamesLanin.
-
AuthorPosts
-
June 7, 2018 at 9:25 pm #220656tanyaslogosMember
Hello, Howdy and HowDo!
I am using a soliloquy slider on my blog posts but the shortcode isn't rendering on the blog page.
I have searched the web over and thought I found a few fixes but they all bombed in the end.
I am sure it has to do with adding a do_shortcode but dang if I can figure out how to do it.
Any help would be greatly appreciated 🙂
Tanya
June 7, 2018 at 10:58 pm #220657Brad DaltonParticipantTry this code
You'll need to change 2 things :
1. The hook to control the position
2. The conditional tag to control which page it displays on.
June 9, 2018 at 2:19 pm #220695tanyaslogosMemberHello Brad! Thank you so much for that link and for the additional information.
Sorry for the delay in getting back to you - I thought I had hit send on this reply but just found it sitting here when I started closing windows. lol
Unfortunately (unless I am reading the info wrong) I don't think that is going to do what I want.
I have added a slider to each of my posts using it's shortcode. I want that slider to display in each post excerpt on the blog page / post section of the home page of academy pro but it doesn't.
I am guessing that it is not showing because excerpts on the blog page block out html and shortcodes. I thought maybe changing it to "content" would do the trick but it didn't.
Is there a way to render a shortcode on the blog page / home page post area?
June 9, 2018 at 8:18 pm #220699Brad DaltonParticipantJune 9, 2018 at 9:03 pm #220701tanyaslogosMemberHello again Brad - Thank you so much for taking the time to follow up! I really appreciate your help 🙂
Unfortunately, the site is still under construction so it isn't live yet 🙁
If you go here: https://my.studiopress.com/themes/academy/#demo-full
Click on Sample Page > Blog Page you will see what I mean.
Where the featured image is showing for each post is where I would like the slider to show. It doesn't have to be above the title which would require additional finagling - it just has to render with the rest of the content on the post page.
The shortcode is on the post page but the blog page is blocking it. lol
That is why I figured I need to do a "do_shortcode" somewhere but I am at a loss as to how to get it to work.
I tried this:
//* enable shortcodes in blog area add_action('genesis_before_content_sidebar_wrap', 'do_shortcode');
But it didn't work - me and PHP are in a
lovehate / hate relationship LOLIf nothing else I will just take an image from the slider and use it as a featured image but it would have been nice to have the option of a slider.
Thanks again for taking the time help! You're the BEST!
Tanya
June 10, 2018 at 12:45 am #220702Brad DaltonParticipantI assume you have added the slider shortcodes at the start of the wp editor in each single post edit screen and that you are using a unique slider for each post?
You want the slider to display in replace of the featured image on the archive page or in the excerpt of the archive for each entry?
June 11, 2018 at 12:57 pm #220759tanyaslogosMemberHello Brad,
Yes! You hit the nail on the noggin. 🙂
That is exactly what I want. Do you think there is a way to make it work?
Thanks again and again and again
TanyaJune 11, 2018 at 10:22 pm #220764Brad DaltonParticipantJune 11, 2018 at 10:47 pm #220765tanyaslogosMemberThat is GENIUS! Looks like exactly what I was trying to achieve and it is freaking GREAT that you have made it work three different ways! The PHP Gods love you lol
Unfortunately it doesn't work for me but I am guessing that is because I don't have the files you mentioned installed. Is there somewhere I can get those files?
I looked on the tutorial page you created but I must be looking in the wrong place.
Thank you so very much for helping me with this! I would love to buy you a beer if you have a paypal account. 🙂
June 12, 2018 at 2:36 pm #220774JamesLaninMember -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.