Community Forums › Forums › Archived Forums › General Discussion › Getting this slideshow to show on my home page above the posts
- This topic has 6 replies, 2 voices, and was last updated 13 years, 3 months ago by
mkpdesigns.
-
AuthorPosts
-
June 26, 2013 at 9:34 am #47797
mkpdesigns
MemberI have a slideshow set up that gives me a shortcode to input, and I want it on the homepage, which is set to be the latest posts. I have looked through the forums for answers but it seems like it might be different since it is the front page and no page ID. Any help is greatly appreciated!
Here is the page that I am trying to get it done. Right now it is set as a sticky post and I am having to hide the author info for it to look good, but I want to reveal and keep that info. (under heavy construction):
http://mkpdesigns.net/demo/carolinansa/Thanks!!!
http://mkpdesigns.net/demo/carolinansa/
MikeJune 26, 2013 at 2:35 pm #47843Brad Dalton
ParticipantYou can copy this code from the view raw link and paste it at the end of your child themes functions.php file using a text editor.
The conditional tag in the code can be easily changed from
is_home to is_front_page()
This PHP code will create a new widget where you can paste the slider short code into a text widget.
You may also need to add support for short codes in widgets by adding this code also.
add_filter('widget_text', 'do_shortcode');
June 26, 2013 at 2:43 pm #47848mkpdesigns
MemberExactly what I was trying to figure out, thank you so much for the help! Worked perfect of course.
June 26, 2013 at 2:56 pm #47854Brad Dalton
ParticipantJune 26, 2013 at 10:46 pm #47967mkpdesigns
MemberReally appreciate it, but would you mind helping with something else real quick? How can I change that to add a widget section at the bottom, after the posts? Sorry I am new at PHP, I am working on learning. Thank you so much!!!
June 27, 2013 at 12:40 am #47978Brad Dalton
ParticipantUse this code however you will need to change the i.d for registering the widget so its different to custom-widget which is what the other widget uses. Needs to be unique for each widget.
You can also change the hook which determines the position it outputs on single posts and the conditional tag.
Examples:
// hooks genesis_after_post_content //popular conditional tags is_single is_home
A suggestion: It is a good idea to install WordPress locally if you plan on custom coding. This way to can learn the basics and make small modifications to the code without any risk. Its something i do dozens of time everyday and one of the best ways to learn coding.
June 27, 2013 at 1:25 am #47981mkpdesigns
MemberThank you so much! You have taught me a lot and I have a much better understanding of it all now. It is very appreciated!!!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.