Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
On a Wordpress site my page.php contains a div that I want to exclude from a single article. I've messed around with the is_single function but I can't get it working.
Any good ideas on how I solve this?
If i get you right, you can do:
<?php if (!is_single():) ?>
<div>
//your div here
</div>
<?php endif; ?>
The solution of #niklas will work. You can also accomplish this by hiding it with CSS. You could do something like this:
.page div.class{
display:none;
}
Replace .class with the class (or ID) of the div you want to hide
Or to hide it on a specific page (or post) you can use the ID class:
.page-id-1 div.class{
display:none;
}
Replace 1 with the ID of the page where you want to hide the div
You can find more information about the available CSS-classes on https://codex.wordpress.org/Function_Reference/body_class.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 days ago.
Improve this question
I have wordpress website , I put banner in the header of my site , this banner will show in all my site pages , I need PHP code to hide this banner in specific page and show another banner only in url that I want instead.
Can anyone help me to change this banner only in specific URL that I want ?
This is the banner enter image description here
Try using CSS and the body class of the page and display:none to hide one or another of the banners.
body.classforthatpage .yourbanner-class-or-id {display:none;}
Use Dev tools to find the body classes for the pages.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I am using the Shapely theme to build a website, and this particular theme uses widgets to create the home page layout and content.
The site I'm working on is currently hosted here.
What I am trying to accomplish is adding an ID to the main title (BimFlooring) so I style it individually with CSS. I can modify it without issue, but down the page, there are elements with the same selector (.image-bg p).
How can I add an ID to just the title on the 1st widget so that the other titles further down are not affected?
*Edit: I should mention I have looked through the themes PHP files and for the widget itself and have not come across a place to modify what I'm looking for.
You can use it below selector for only first section css.
example
/* Below selector for p tag text */
shapely_home_parallax-1 .image-bg p { }
/* Below selector for h1 tag text */
shapely_home_parallax-1 .image-bg h1 { }
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I am coding up a page and I have placed a form in a container-fluid div. And it made a line to appear and I can't make it dissapear.
This is the page : http://sacim-design.esy.es/contact.php
This is a screenshot with the border : screenshot
Remove html tag <legend>or restyle it
CSS
legend{
border:none;
}
Beware, you are using bootstrap styles..to make your custom styles you
need to overwrtite them
Your problem is an empty <legend></legend> tag inside your form. It has a border-bottom rule. Just remove this element.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I have a site visible here where I have created a child theme in order to add a custom header and footer from the rest of the (non blog) website.
I've removed everthing from the existing header apart from <?php wp_head(); ?>
as this is required to call many other elements in the page. However at larger screen resolutions there is what appears to be a div present on the left hand side of the screen, which I would like to remove.
using firebug this element appears to be in the body, but i couldn't track it down any further. This must be a pseudo element of some kind?
Then i will be able to add in my header.
In your stylesheet, you have:
#media screen and (min-width: 59.6875em)
body:before {
...
}
This body:before pseudo-element is what is creating that "div" on the left hand side of the screen.
Note
The psuedo element properties begin on line 3893 of style.css?ver=4.1.1.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I am desperately trying to remove the irritating HOME hyperlink from the header of my WP page. See here, in the upper left corner: http://almagest-centar.hr/?page_id=2 (this is Academica WPZOOM theme).
Is there any way to remove it? I've seen there has been a discussion about this (here), but it doesn't work. My functions.php doesn't contain the lines mentioned in the thread.
You are trying to remove breadcrumbs. Please delete from you view this code with all inside it:
<div id="crumbs">
</div>
Or you can also edit your CSS file:
div#crumbs {
display: none;
}