Tag Info

New answers tagged

1

change this line: $item_output .= $args->link_before . apply_filters('the_title', $item->title, $item->ID) . $args->link_after; to: $item_output .= $args->link_before . apply_filters('the_title', substr($item->title, 0, 10), $item->ID) . $args->link_after; That limits the character to 10. Please note this substr($item->title, ...


2

One of the hard requirements of WordPress theme is presence of style.css file with a header. It doesn't go beyond file being present or even used at all, it can be otherwise empty. The CSS itself has no requirements on WP side and falls under generic web development.


0

I dont have an iPAd to hand to test this but I know that Safari likes to change phonenumbers into links which would override the current CSS which makes the text white. You will need to change the CSS to ensure links remain white. Try adding this CSS to your theme's style.css: #main-site-caption #number { color: #fff; } If you cant contact the ...


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 ...


0

I found another way to do this: .headerNavMenu { width: 100%; display: table; text-align: center; margin: 0; } .headerNavMenu ul { display: table-row; } .headerNavMenu li { display: table-cell; margin: 0; }


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.


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“). ...


0

You can simply add those CSS to admin HEAD section, it's fast and easy solution. function jrl_styles() { ?><style type="text/css"> #jrl-wrap { width: 700px; padding: 3em; /* ... */ } </style><?php } add_action('admin_head', 'jrl_styles'); Or you can enque your CSS file like this: function ...


0

Make sure you have the alignleft and alignright classes defined properly. They should have float: left; and float: right; respectively. Make sure you correctly float your elements and clear the floats where you want to start a new row/section. This is a CSS-only issue. EDIT: Check this solution, note the clear and float CSS declarations: ...


0

You could also add in your category template file a code similar to this one: <?php if(is_category('category-slug-here') { ?> // display your HTML meta here <?php } ?> You would probably need to check for subcategories, but this should get you started if you want to take the PHP approach.


0

You can try this solved your problems: add_action('admin_head', 'my_admin_custom_styles'); function my_admin_custom_styles() { $output_css = '<style type="text/css"> .column-date { display: none }; .column-tags { display: none }; .column-author { width:30px !important; overflow:hidden }; .column-categories { ...


0

You can assign a class with JavaScript to the paragraph tag if it has an img: jQuery: $(".entry-content p").each(function(){ if($(this).find("img").length > 0) $(this).addClass("has-img"); } then just add a css rule: p.has-img{ width: 100%; }


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.


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() { ...


0

I think you are pretty much there. In your JavaScript you are referencing log_forms as a class, but in your HTML it looks like log_forms is an ID. So you would need: $( "a.toggle").click(function() { $("#log_forms").toggleClass( "open" ); }); Then the css would be: #log_forms{ display: none; } #log_forms.open{ display: block; } Example: ...


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

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; ...


0

OK. Even though I wasn't able to figure it out with CSS and wp_head() I managed to hack something that works. <?php $sidebar_background_color = get_theme_mod('design-sidebar-background-color'); ?> <aside style="background-color: <?php $sidebar_background_color; ?>;"> <?php if ( !function_exists('dynamic_sidebar') || ...


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.



Top 50 recent answers are included