Tag Info

Hot answers tagged

6

The fact that <style type="text/css" media="screen"> html { margin-top: 32px !important; } * html body { margin-top: 32px !important; } @media screen and ( max-width: 782px ) { html { margin-top: 46px !important; } * html body { margin-top: 46px !important; } } </style> is added for Admin bar by wp-core at the ...


3

You can use the logged-in class added by body_class to target your CSS rules. .container { height: 160px } body.logged-in .container { height: 30px }


2

The styling of WordPress sites is nearly exclusively defined by its theme. You can typically discover theme by examining the source for style.css file, which contains header with theme information. In this specific case it would be commercial Porto theme, which you can purchase and use for your site.


2

First of all i'd recommend you stop using title attribute for html container purpose: Image title (and the element name speaks for itself) should provide additional information and follow the rules of the regular title: it should be relevant, short, catchy, and concise (a title “offers advisory information about the element for which it is set“). ...


2

I'm not really sure why you'd want to do this...but the only thing I can think of that might work is something like this: function prefix_block_resources(){ if(is_admin())return; //I can't imagine any scenario where blocking scripts in the admin area would be wise. global $wp_scripts; global $wp_styles; ...


2

As i got the solution so i am posting it here. Wordpress uses current-menu-ancestor and current_page_ancestor classes. So we can use them as below .mainmenu .current_page_item > a, .mainmenu .current_page_ancestor > a, .mainmenu .current-menu-item > a, .mainmenu .current-menu-ancestor > a { font-style: italic; }


1

Not a WordPress question, but add the following in your stylesheet: .featured-text h2, .featured-text h2 a { font-size: 24px !important; /* set font size */ } In the future, simply Inspect Element to find which class or tag to style.


1

You are calling jQuery wrong by the shorthand $. If you will look in your console you will see an error that $ is not a function / undeclared etc (this is due to jQuery's conflict mode if I am not wrong). Your code should look something like this: <script type="text/javascript"> jQuery(function($) { $( "a.toggle").click(function() { ...


1

I actually ran into a similar issue yesterday. A theme I was working with was adding 500+ lines of internal styles to the header which absolutely drives me nuts! I ended up finding a clever solution online to work around this which you could use for CSS. The JavaScript side I'll explain toward the bottom. --- :: CSS :: --- There's a few key points in how ...


1

Yes, that's possible! For the default homepage, you can use this: body.home { background-color: #ff0000; } For a specific blog post, you can use this where 5 is its post ID: body.postid-5 { background-color: #00ff00; } And this is for a specific page and it's the same where 5 is the page ID: body.page-id-5 { background-color: #0000ff; }


1

Just add to your theme this code: <?php get_search_form(); ?> This code will echoing search form so place it everywhere where you want to have the search form. Further you need to have search.php file in your theme which will show the search results. You can use ordinary WP loop in the file.



Only top voted, non community-wiki answers of a minimum length are eligible