Disable header and sidebars from a specific post?

Is this possible to disable header and sidebars from a specific post?

Actually I made a donation page in post format by mistake. I know I should create a page for that but I created a post and set donation buttons and everything.

In X theme we get options like disable header/sidebars in a page section only, not in a post.

Can you tell me how to hide header and sidebars of a specific post (not all posts)?

I tried adding css code in Body CSS Class(es) section of Post settings but nothing worked.

Hi Sansar,

Thanks for writing in!

Unfortunately, that feature is not available in the theme, you need custom CSS to hide the header and sidebar . for the particular post.

The example CSS should look like this.

body.postid-10675 .masthead, body.postid-10675 aside.x-sidebar {
display: none !important;
}
body.postid-10675 .x-main {
width: 100% !important;
}

The post class should be found in the body.

If you would like to learn CSS, I am sharing few resources that you take a look to get started with CSS and an interesting tool that you can use to speed up the development process.

I recommend you to watch following video that will help you to get started with CSS.

https://www.youtube.com/watch?v=MFR4WXiLzpc

Sometimes it can get a bit difficult to find out the right selector to be able to write the required CSS codes. A handy tool that can help you in this is Google Chrome dev tools. I am sharing the resource that you can refer to get started with dev tools.

https://developers.google.com/web/tools/chrome-devtools/css/

https://developers.google.com/web/tools/chrome-devtools/

https://www.youtube.com/watch?v=tP_kXBJWPhQ&t=200s

Thanks.

Hi I tried to add the above code but nothing worked. I put on the right post id but still result is zero.

Kindly see this screenshot and tell me where to add your css code :

Hi Sansar,

Thanks for writing in!

You have added the code in the wrong place. Please add it to X->Theme Option -> CSS.

Hope this helps!

Oops sorry. I am little novice so I placed code in wrong place.

Well Happy New Year

Can you tell me one more thing…How can I put a stylish or glittering or non-moving text like “Happy New Year 2019” in topbar.

I simply tried to add text in theme options>header>topbar but it was not appearing .

Hi Sansar,

Thanks for updating the thread and Happy New Year to you too!
Please check if your top bar is enabled or not. If it is enabled then the text should come.

On your website, I didn’t see any text in the header. Can you please confirm if you have added it?
Regarding the style of the text, you have to add custom CSS for that.

Thanks

Hi how can I add “Telegram icon with link” in social media?
Like if i don’t use GITHUB PROFILE URL…can it be replaced by Telegram icon with appropriate link?
Kindly give me code.

fa fa-telegram

Hi Sansar,

A quick way to do this would be to place your telegram link to the github URL area then to replace the github icon with the telegram icon, please add this code in the Global JS: X > Theme Options > JS:

jQuery('.x-social-global a.github i').attr('class', 'x-icon-telegram-plane');
jQuery('.x-social-global a.github i').attr('data-x-icon-b', "");

Hope this helps.

That’s great. It worked …How can I change hover color and hover text of the icon ?

Hi Sansar,

You can do that by adding this CSS as well with your preferred color

.x-social-global a.github:hover {
color: #cccccc;
}

Thanks!

Global JS scripts are disabled after existing. When I applied your code and run Global GS & saved settings…icon was replaced successfully but after then I am unable to see telegram icon. Old icon of gitHub is still displaying. Is there not any permanent solution?

Hi There,

The github icon is showing up on this page:

But not your home page:

It might be the caching issue. Do you have any cache plugins installed? Please disable all of them.

If it still doesn’t help, would you mind providing us with login credentials(by clicking on the Secure Note button at the bottom) so we can take a closer look? To do this, you can make a post with the following info:

  • Link login to your site
  • WordPress Admin username / password

Thanks.

May be that was a caching issue.

One thing more I wanna ask. I was actually configuring google custom search bar inside my blog (in a widget). Google gives option to show a search result page outside blog or inside blog’s page. I chose inside my blog’s page.

Everything is working but look of the page is ugly. I mean I am getting boxes kind of in search results that seems not in a perfect format. Is it a theme conflict? How can I cope with that problem?

Hi Sansar,

Regretfully that isn’t a feature of X. this falls outside the scope of support we can offer. You may wish to consult a developer to assist you with this or contact the google custom search author/support to assist you on this.

Thank you for understanding,

Okay I will ask them. Can u tell me how to change the hover text of Github? I changed the color of icon from the following code.

.x-social-global a.github:hover {
color: #cccccc;
}

Hi Sansar,

Since you have replaced Github icon with Telegram, it is still showing Github when hovering over.

To resolve the issue, add the following JavaScript code also into your X -> Theme Options -> JS area.

jQuery('.github').prop('title', 'Telegram');

Hope that helps.

Wow it worked, thanks @mldarshana

You’re welcome. Glad it helped.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.