I am trying to style the error page related to the error "This has been disabled".
This error comes up when people try to access the page https://benefacto.org/wp-admin/.
I thought maybe because it was a link with "wp-admin" it might be related to back-end styling?
I tried styling it with my stylesheet that is enqueued on the back-end it did not work.
Is there maybe a specific stylesheet I need to enqueue to style the error?
This is the styling I am trying to apply to the page:
/* Customises the WP-Error message on the login page */
body#error-page {
background: #9100c0 !important;
}
Here is a screenshot of the page I want to style:
The link for this page is "example.com/wp-admin"
I appreciate any help or suggestions! ^_^
This one login page for update css. Error page for not any filter functions more information
Add this code on your activated theme's function.php
function my_login_custom_css() {
?>
<style type="text/css">
body#error-page{
background-color: #9100c0;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'my_login_custom_css' );
Related
I was given the task of customizing a specific section of a website. This section is primarily made by an Event Manager Plugin on WordPress. This plugin allows users to create their own events that will be published in a calendar page. The thing is, I need to get rid of the page header only on the pages created by this plugin, that will have an URL similar to this: http://mypage.com/eventos/user-event-name
So, I only need to apply the code .site-header { display: none; } ONLY to the pages that have this /eventos/something URL. Can this be done?
When I put the above code on the Custom CSS of my theme it gets rid of the header across the whole website, and I don't want that.
I have absolutely no background in CSS so I most definitely am using the wrong definitions here. Thanks in advance, hope someone can help me!
You can check if there is evestos in URL and add a class to body
like this
add_filter( 'body_class','my_body_classes' );
function my_body_classes( $classes ) {
$url = strpos($_SERVER['REQUEST_URI'];
if($url, "/eventos/")) {
$classes[] = 'eventos-page';
return $classes;
}
}
After that you can add css to that class like for example
.eventos-page .site-header {
display: none;
}
I am trying to hide the header on a specific page in WordPress. I know that I can do this using CSS.
The page id as displayed in the dashboard is:
wp-admin/post.php?post=31221&action=edit
The page has a header without an id or class (not sure who built it). But I can hide the header with:
header {display: none;}
I can't seem to hide the header on the specific page. I have tried:
.page-id-31221 header {display:none;}
.pageid-31221 header {display:none;}
I have also tried the same with # and postid etc etc. Is there another way to hide the header on that page?
Failing that is there a way I can hide the header after it has been called in the template? I have created a custom template for the page but im not sure of the php to use to hide it. If I remove <?php get_header();?> from the template then the whole page disapears.
The website is here: Website
You say you have created a template for this specific page.
In which case you can use jQuery to hide the header. Add this to the end (or start) of your page template.
<script>jQuery('header').hide();</script>
You would probably want to wrap this inside something like a jQuery( document ).ready(function() { to ensure the page is loaded before the script is run. Maybe add in the defer attribute too.
You can modify your header.php by adding an IF-statement which checks for the required pages by either the page/post ID or title.
Page/Post ID method:
if(is_page(get_the_ID()) != YOUR_PAGE_ID) { // show header }
Page/Post Title method:
if(!is_page(get_the_ID('PAGE_POST_TITLE'))) { // show header }
Either of these methods should work. *Not tested.
You can do this by checking the page name.
if( is_page( array( 'about-us', 'contact', 'management' ) ){ #hide your header; }
If you want more details please read the wordpress official documentation. It will helpful for you.
Read wordpress official documentation
This works for me. A simple trick:
Check your style class name in your header.php in the top example: class="header">
And place this code in the top from your php template or page.
<head>
<style>
.header { display: none; }
</style>
</head>
<body>
I am having trouble overriding the default styling that comes with WooCommerce. Specifically, I am trying to hide certain fields that display on my checkout page (see screenshot of the code). I mocked up my page on Code Pen and my css is working fine, so I am not sure why it doesn't work on my styles.css of my child theme. Any help is appreciated!
.variation li div:first-child {
display: none; }
https://codepen.io/jagorski/pen/oZBYrd
Clear the browser cache & try this:
.variation-JobListing:first-child {
display: none !important;
}
I tried my best but I couldn't make the following theme full width/screen by editing the CSS. I'd be very much grateful if you could show me or give me a hint regarding this customization.
http://envirra.com/themes/blackmag/?cat=4
the theme itself has an option for full with and posts without sidebar, but it only displays the header and slider with full width, all the rest, the blog and footer is still boxed
To create a new page layout you need to access your theme files and
open up and edit page.php.
create a template with full-width.php.
Select a page template in admin page section.
For more information refer following link:
https://premium.wpmudev.org/blog/create-full-width-page/
Add this css.
#media (min-width: 1200px){
.category .container {
width: 100%;
}
}
I am working on this website. I am trying to filter the the two arrows shown above each image(previous and next) if its the front page. I have created the following hook for it,
function removal() {
return null;
}
if(is_front_page()){
add_filter('prev', 'removal');
add_filter('next', 'removal');
}
The problem is that the images are still getting displayed. Any ideas why?
Edit: there is a more elegant way in the CSS style-sheet, taking advantage of the fact that WP gives the home page's body the home class:
body.home .prev,
body.home .next { display: none }
this targets the "prev" and "next" buttons on the home page only.
Old answer: Output the CSS in your if(is_front_page()) call.
In the page's <head> section, do
<?
if(is_front_page())
echo "<style type='text/css'>.prev, .next { display: none }</style>";
?>