Community Forums › Forums › Archived Forums › Design Tips and Tricks › News Theme: Widgets Only on Home Page
Tagged: widgets home page
- This topic has 8 replies, 4 voices, and was last updated 10 years, 9 months ago by LindaV42.
-
AuthorPosts
-
May 28, 2013 at 7:54 am #42903raunekkParticipant
In News theme, there are three widgitized areas - Home top, Home middle left, and Home middle right. I want to make sure that the contents of these three are visible only on the home page. I tried using "widget logic" plugin, but it doesnt seem to work.
Kindly help.
Raunek k
http://www.marineinsight.comMay 28, 2013 at 8:10 am #42905Brad DaltonParticipantThose widgets are coded in the home.php file and only display on the home page by default.
May 28, 2013 at 10:53 am #42931raunekkParticipantHi Brad,
What I meant is if I use "Featured Amplified Plugin" in the Home bottom like on http://www.marineinsight.com with pagination, the second page also has the contents in the "home top, home middle left, and home middle right" widgets.
Any way in which I can make sure that the second page only has articles listed from the Featured Amplified Plugin" in the Home bottom widget area?
Thanks a lot in advance.
Regards
Raunek k
June 19, 2013 at 3:19 am #46703herrmaxMemberHi, Raunek k.
I saw that you solved your problem.
Can you please share your solution?
Kind regards,
Max
June 19, 2013 at 6:45 am #46716Brad DaltonParticipantHi Raunek k
I think an easy solution might be to install the Widget Logic plugin and add a conditional tag to the field for the Featured Amplified Plugin.
June 22, 2013 at 12:45 am #47152raunekkParticipantSorry for the late reply guys
@herrmax No I was not able to resolve it, therefore, I had to keep the layout of my blog unaltered
@braddalton - It doesn't work with the conditional tags. Already tried several times...Hope someone from the members can give us a solution to this.
June 22, 2013 at 12:33 pm #47194Brad DaltonParticipantYou'll need to use the correct conditional tag or it will not work.
Here's the code from the News themes home.php file showing the widgets only display on the home page.
function news_home_loop_helper() { if ( is_active_sidebar( 'home-top' ) ) { echo '<div id="home-top"><div class="border wrap">'; dynamic_sidebar( 'home-top' ); echo '</div><!-- end .border wrap --></div><!-- end #home-top -->'; } if ( is_active_sidebar( 'home-middle-left' ) || is_active_sidebar( 'home-middle-right' ) ) { echo '<div id="home-middle"><div class="border wrap">'; echo '<div class="home-middle-left">'; dynamic_sidebar( 'home-middle-left' ); echo '</div><!-- end .home-middle-left -->'; echo '<div class="home-middle-right">'; dynamic_sidebar( 'home-middle-right' ); echo '</div><!-- end .home-middle-right -->'; echo '</div><!-- end .border wrap --></div><!-- end #home-middle -->'; }
Any content you use in these home page widgets will only display on the home page.
You can use conditional tags to control the output of widget content so it doesn't display on archive pages. Example:
!is_paged
Otherwise, please test another conditional tag until you find the solution that suits your needs.
July 11, 2013 at 1:00 am #50214raunekkParticipantPerfect Brad! That worked.
Thank you so much!!
Raunek k
July 12, 2013 at 10:27 am #50388LindaV42MemberI am having a similar problem with the Agency Child theme for both the responsive slider, the home welcome and the home right, home left and home center widgets. The default is the blog home page for the slider and the home welcome. Somehow the home left, right and center ended up on my about page, Now it has disappeared altogether.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.