• Resolved adminactivecode

    (@adminactivecode)


    Hi!

    So I installed this plug-in and I really like it, but the problem is I have a Sidebar on my single page view and I’d like to get rid of it. I’ve tried looking on my theme’s support forums to get rid of the sidebar from all new generated pages but they say I need a Child Theme, but I’d like to know if there’s a way to do it with custom CSS on my actual theme.

    I read some posts where it said to create a page ie single-news.php and copy the single-page.php code and customize it in there. I did this, only I named it content-single-news.php since I had content-single.php. As soon as I created the new file my page went blank, and no matter what I did to the new file it kept on being blank.

    On the other hand, the first thing on my content-single.php file, refers to the sidebar and it goes like this:

    global $virtue_sidebar;
    if( kadence_display_sidebar() ) {
    	$virtue_sidebar = true;
    } else {
    	$virtue_sidebar = false;
    }

    I am really new to coding but I think this means you have an option of showing the sidebar or not, which I have when creating my general posts on the page, but it’s nowhere when creating a news post. So I don’t know if there’s a way to show the option of sidebar or no sidebar on a new sigle news item page.

    I can’t really share a page to my link since I’m working on a localhost while I finish creating it, but anything I can show to help please let me know.

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @adminactivecode

    Thanks for reaching here,

    Please create new single-news.php file instead of content-single-news.php and paste code of single-page.php code and from that replace this

    global $virtue_sidebar;
    if( kadence_display_sidebar() ) {
    	$virtue_sidebar = true;
    } else {
    	$virtue_sidebar = false;
    }

    With $virtue_sidebar = false;

    You will get a full width page.
    Let me know if that works good or not on your theme.

    Thanks and Regards.

    Thread Starter adminactivecode

    (@adminactivecode)

    Hello,

    I did that and it still crashes, the whole site goes blank, not only the single article page but the whole website. I tried changing the name according to things I found while inspecting it to:

    single-article.php
    single-news-post.php
    news-template-default.php
    single-wpnews.php

    None of them worked. I also did it with the single-nes.php as you said but nothing.

    I am using a plug-in called “Custom CSS and JS” that came with the theme or with www.ads-software.com, (I’m not sure with which) and clicking on “add CSS code” and creating a file there. It has worked with everything else I’ve done till now but I don’t know if there’s the problem. It gives me some options for the file, these are they and the ones I’ve checked for my file:

    Linking type:
    External file
    Internal (checked)

    Where on page
    Header (checked)
    Footer

    Where in site
    In frontend (checked)
    In Admin
    On Login Page

    Those were default options and I haven’t moved them so I don’t know if the problem is there or maybe I’m using the wrong programme.

    Thank you

    Hello,

    Thanks for your feedback. But It is wordpress standard you can override custom post template with single-custom_post.php file.
    So here news is our plugins custom post type and you can override this template with single-news.php file.We have test it our theme and it’s work properly. May be there is some syntax issue with your code.I am not sure(single.php file), Why it is not working. For more help please contact to your theme author they will guide you better.

    Thanks & Regards

    Thread Starter adminactivecode

    (@adminactivecode)

    Oh ok thank you very much

    You are welcome ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘single page view’ is closed to new replies.