Edit elements of the RIGHT NOW dashboard in Wordpress Admin - php

I'm customizing the Wordpress Admin site to suite my needs and there are several things I want to remove and customize (menus, etc...).
I noticed on the DashBoard section called 'Right Now' there are several things I don't need there. For instance the CHANGE THEME button and the wordpress version and theme. I found in the source dashboard.php where these are rendered, but rather than edit the source, can I just make a function that intercepts and changes this so it doesn't render them?
I also want to remove the DISCUSSION section and some of the counts for CATEGORIES, TAGS, and PAGES.
Is there a way to go about this? Thank you!

Hmm I think I solved this myself, although I'm not sure correctly. Using firebug I was able to find the class names and element ID's of the version and CHANGE THEME button and the version and theme
I added this code in my functions.php:
function wpc_remove_admin_elements() {
echo '<style type="text/css">
.versions p {display:none !important;}
.versions #wp-version-message {display:none !important;}
</style>';
}
add_action('admin_head', 'wpc_remove_admin_elements');
This added some styling in my header to hide these elements.
Is there a more efficient way to do this or am I going to be ok? I still don't know how to hide some of the Content and Discussion counts in the RightNow dash.

Related

Hide excerpt in WP Job Manager resume list

I'm trying to delete the excerpt that appear on resume list in wp job manager. See the screenshot to understand better. Anyone knows how can I do that?
You should be able to remove excerpts when you edit your page template file and remove the_excerpt(); function from it (be sure to move template to child theme first).
Or simpler method would be using CSS. Just write into your theme's custom CSS:
yourExcerptSelector{
display: none;
}
(CSS will hide it but will not remove it)

WooCommerce Styling issues

I really hope someone can help me with this, it is driving me mad. I have installed WooCommerce on an off-line test site on a default theme (TwentyThirteen) and it works and looks great.
When applying it to a theme I have developed however, the styling of the products completely break and display in a vertical list, with the links styled as per the rest of my page.
I've tried all the instructions on the WooCommerce website to integrate it to my theme (both methods of either using a catch all page, or adding hooks), and all of this still results in the same broken layout.
Now, through many hours of looking in to this and comparing my theme to that of TwentyThirteen, I have noticed that when I render the page, the '
ul and li tags of the products on TwentyThirteen theme are using woocommerce.css, and on mine just the styles I had already set.
So for some reason TwentyThirteen theme can look at the woocommerce stylesheet, and my theme can't. All the settings for WooCommerce are identical as I am just switching themes.
I have declared my style.css in my header but nothing else regarding enqueuing scripts etc. Is this where I am going wrong? And if that is the case could someone point me in the right direction on what to put either in my header or functions.php please to make it work? I seem have no trouble with any other plugin I use on my own theme.
Thanks for your time reading this and any advice you can give me. :)
Make sure you have body_class() into your <body> tag like this :
<body <?php body_class(); ?>>

wordpress remove scroll bar from a specific page

I need to remove vertical scrollbars from a specific webpage only in my site
http://historyofliverpool.com/test-2/
The page is made up from many php and css files, to I do not know where to begin editing, and do not want to alter the rest of the site.
Would a custom field on this page only solve my problem?
Any help much appreciated.
I can't find any overflow: hidden in your stylesheet.
Please try this:
.fullscreen {
overflow: hidden;
}
Removing the scroll bar is easy; you would simply need to apply overflow:hidden to the body selector.
The real challenge is removing the scroll bar on the correct page. There are quick and dirty ways of doing this, but lets take our time and look at this sensibly:
Child Themes
It looks like you're using the Anglepane theme. As this is a commercial theme I'd recommend you first create a child theme before making any changes. This way when the Anglepane theme is updated it doesn't remove your edits.
Identifying the page - body_class()
The next step is identifying and selecting the page you want your changes to apply to. WordPress has the convenient body_class() function that adds CSS classes to the body element, allowing you to easily add styles on a page by page basis. Now it looks like your theme isn't using this function; so you should add this function by:
Copy the header.php file from the parent theme folder to your child theme folder so you can edit it
Find the body tag and alter it like so:
<body <?php body_class( $class ); ?>>
Identifying the page - ID vs template
Once you've added the body_class() function you should find that your body element will have a bunch of classes that you can use; one of these will be the page ID, prefixed with .page-id-. You can now use that class name for your CSS. For example, if your target page had an ID of 3 you could use:
.page-id-3 {
overflow:hidden;
}
While this works, I personally like to use page templates instead for targeting page-specific styles. One of the benefits to this is that it avoids mismatched page IDs between different environments. For example, I might want to change the background colour of my about page, which has an id of 4:
.page-id-4 {
background:red; // Works as long as the page ID is definitely 4
}
That works great on my local copy of the site, but on the live site my about page has an id of 24. I avoid this by creating a page template specifically for my about page. This way I can use the page-template selector instead, which is consistent across both environments:
.page-template-about {
background:red; // Now I work everywhere
}
Hopefully that convers everything in sufficiently detail for you.

custom css styles from (within - inside) wordpress dashboard

I am looking to edit the css styles from inside the Dashboard inside of wordpress and NOT have to edit the php files if possible.
I know it is possible to edit at least some of the properties so my hope is I can edit all of them right within the dashboard.
MORE SPECIFICALLY
How can I change the css states of links and submenus of a custom class? For example the a:active, a:hover, a:link etc... and ALL OF THE SUB-MENUS to custom css as well?
I have included these pictures to show you what I am trying to do and the present results.
MY CUSTOM MENU INSIDE OF WORDPRESS
CUSTOM CSS INSIDE OF WORDPRESS
THE RESULTS
I am taking the time to give a little more details in gratitude for all the help I got on stackoverflow over the years, also giving a little more info for the newbies out there. We are all learning.
Here is what worked in pictures
I used Firefox and used "INSPECT ELEMENT". While on the page I did a LEFT CLICK and from drop down I chose INSPECT ELEMENT.
Then I clicked on the PICK AN ELEMENT icon, as seen in the picture and then I hovered over the element I wanted to edit, in this case a button in the menu. This gave me the class I needed to edit.
I went into my DASHBOARD in WordPress and made this change to the code. Finally I got the results I was looking for, which I also included in the same picture as well.
Although I have not figured out how to edit the sub-menus yet I believe I am on the right track and will figure it out.
HOPE THIS HELPS SOMEONE. :)

How to introduce CSS rules in Tumblr environment without affecting the theme?

I needed few simple changes to the style sheet files and I successfully managed to make these changes offline through Google Chrome Inspector but when I tried every time to implement these changes on the Tumblr theme, the blog breaks down and becomes a big mess.
Can you guys tell me please how to tackle this issue? What's the right approach or the appropriate workflow to introduce such changes of this nature without disrupting the theme?
Thanks in advance for your time and cooperation.
Tumblr themes should have the ability to insert Custom CSS.
When inside your 'Customize Theme' panel, open the 'Advanced' tab (at the bottom), there will be a box that will allow you to add Custom CSS. Add the changes you'd like to make there.
If you don't see the changes, your theme might not be optimized to accept the custom CSS that you've entered.
Click on the 'Edit HTML' button and search for {CustomCSS}. If you can't find it, then you'll need to add the following code before the </head> tag.
<style type="text/css">
{CustomCSS}
</style>
That should do it!

Categories