Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #151432
    ABrimble
    Participant

    Hello,

    I would like to have widgets display only on specific pages. Please could you advise how this would be achieved?

    I would like the CT Video Embeds to only display on my Home Page.
    I would like Featured Content to only display on my News (Posts) page.
    I would like CT Gallery Images to Only display on my Gallery Page.
    I would like CT Tours to only display on my Live page.

    I understand that I can display these widgets conditionally in sidebar areas, but I would like to be able have these widgets display across the whole page.

    Many Thanks

    #151449
    Skandha
    Participant

    @abrimble: Please post in your site URL so that I can provide you the CSS for that!

    Kind Regards,
    Skandha

    #151546
    ABrimble
    Participant

    Hello Skandha,

    The URL is http://www.the-ruffs.com.

    Many Thanks

    #151626
    Skandha
    Participant

    @abrimble: Please setup of all the widgets you want to then I can provide you the CSS to display them only on particular pages.

    Kind Regards,
    Skandha

    #151632
    ABrimble
    Participant

    Hello Skandha,

    I have setup my widgets:

    The CT Video Embeds currently displays 3 YouTube videos, but I would like to restrict this widget to only the Home Page.

    I have set the CT Gallery Images widget on my Gallery Page. At present, I have placed this Widget in the ‘Page Template – Blank Page’ widget area & set the Page template to Blank Page. I would like to be able to use the ‘Default’ page template and only have the CT Gallery Images widgets on my Gallery Page.

    I have set the CT Tours widget on my Live Page. I have placed this widget in ‘Page Template – Blank Content Page Area’ & set the Page template to Blank Page. I would like to be able to use the ‘Default’ page template and only have the CT Tours widget on my Live Page.

    Many Thanks

    #151645
    Skandha
    Participant

    @abrimble: Go to => Appearance => Customize => Additional CSS and add the following CSS Code.

    /* To display CT Video Embeds only on homepage */
    body:not(.home) #ct-video-embed-2 {
    	display:none;
    }

    To display Featured Content only on News Page first you will need to enable Featured Content on the entire site and then use the following CSS Code.

    /* To display Featured Content only on News Page */
    body:not(.blog) #featured-content {
           display:none;
    }

    To be able to use the ‘Default’ page template and only have the CT Gallery Images widgets on your Gallery Page and have the CT Tours widget on you Live Page setup the widgets on the widget areas like Before Posts/Pages or After Posts/Pages.

    Let me know if this works out!
    Kind Regards,
    Skandha

    #151654
    ABrimble
    Participant

    Thank you Skandha,

    I have applied that code successfully.

    I have added the CT Gallery Images widget to the After Posts/Pages section, but this now also displays the gallery on my Home, About and News pages. Please could you provide code to only display the gallery widget on my gallery page?

    is it something like

    body:not(.gallery) #ct-gallery-images {
    display:none;
    }

    Many Thanks

    #151685
    Skandha
    Participant

    @abrimble: To display the gallery only on Gallery page
    Go to => Appearance => Customize => Additional CSS and add the following CSS Code.

    body:not(.page-id-50) #ct-gallery-image-2 {
          display:none;
    }

    Let me know if this works out!
    Kind Regards,
    Skandha

    #151703
    ABrimble
    Participant

    Hi Skandha,

    That has worked how I wanted it. Thank for you for your assistance.

    Best Regards

    #151705
    Skandha
    Participant

    @abrimble: Hello, there, I hope I was able to resolve your issue. If it’s not too much trouble, I have a quick request: could you please leave an honest review?
    https://wordpress.org/support/theme/rock-star/reviews/#new-post
    Your review will help others know what to expect when they’re looking for the support I offer. Even a sentence or two would be hugely appreciated. Thanks, and if there’s anything else at all that I can do to help,
    don’t hesitate to let me know. Have a good day! 🙂

    Kind Regards,
    Skandha

    #165527
    jcachero
    Participant

    Hi there! Im working with rock star pro and i think im having the same trobule. I only want to show some widgets on home, not in pages and posts. I want to show on pages and post only the content.

    In home i want to show CT About, CT Background Image, CT Video embed, CT Background image, CT Audio, CT Background Image, CT Tours, CT Promotion headline, CT Gallery images and CT Social Icons. All of these must set only at the home page.

    Can you provide me the code please? Thanks!

    #165587
    Skandha
    Participant

    @jcachero: Please post in your site URL so that I can look into the issue and help you out!

    Kind Regards,
    Skandha

    #166000
    jcachero
    Participant

    Hi there, i could solve the problem with the code that you posted up here with the widgets of rockstartheme. Now i want to show only a widget that is not from the theme, is called Gallery only at home, not in posts and pages.

    The site is http://www.jorgefuentes.com.ar and the widget of the problem is located after the content. Yo will see 16 images that if you click theme a lightbox gets opened to see the images in full.

    Thanks for your answer!!

    #166078
    Skandha
    Participant

    @jcachero: Go to => Appearance => Customize => Additional CSS and add the following CSS Code.

    body:not(.home) #responsive_lightbox_gallery_widget-2 {
         display:none;
    }

    Let me know if is what you want!
    Kind Regards,
    Skandha

    #166459
    jcachero
    Participant

    Yes! It works!

    Thanks!!!

    #166569
    Skandha
    Participant

    @jcachero: Hello there, I hope I was able to resolve your issue. If it’s not too much trouble, I have a quick request: could you please leave an honest review?
    https://wordpress.org/support/theme/rock-star/reviews/#new-post
    Your review will help others know what to expect when they’re lookingfor the support I offer. Even a sentence or two would be hugely appreciated. Thanks, and if there’s anything else at all that I can do to help, don’t hesitate to let me know. Have a good day! 🙂

    Kind Regards,
    Skandha

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Display Widgets Conditionally on Specific Pages’ is closed to new replies.