Tag Info

New answers tagged

0

Adding the word 'stuff' with the :after pseudo element is clever but a bit hacky since your site is now just called Cool and Creative as far as search engines and other non-visual browsers are concerned. Better would be to add a filter to your functions.php to change the site title. We need to add the filter after wp_head has been called to avoid putting ...


0

The CSS is coming from Owl Slider :- http://owlgraphic.com/owlcarousel/ You can create a Owl-Theme CSS and use the CSS to override default Owl CSS.You will need to enque your Owl CSS file after Owl Theme CSS is getting loaded.Hope that solves the problem. :)


0

wp_filter_nohtml_kses() doesn't appear to work properly because it escapes the " character, so you can't write any attribute selectors. It seems like there is no "simple" way to do this.


1

Don't worry! It's not a mess up thing, it's actually CSS minification. :) Minification is a way to serve less weight files to the visitors. But irony is, minified files are not good to read, and not good to edit too. :( It's actually for machine. To not to go in that way, just check your LESS compiler. Somewhere in it, you have checked the compiler to ...


1

Would you please try below code to your plugin page. if the script file is your plugin root directory. function plugin_adding_scripts() { wp_register_script('my_test_script', plugins_url('testscript.js', __FILE__), array('jquery'),'1.1', true); wp_enqueue_script('my_test_script'); } add_action( 'wp_enqueue_scripts', 'plugin_adding_scripts' );


0

Add below code to your functions.php function add_script_and_style() { // for .css add wp_enqueue_style('my-style', get_template_directory_uri() . '/my_style.css'); // for .js add wp_enqueue_script( 'my-js', get_template_directory_uri() .'/filename.js', false ); } add_action( 'wp_enqueue_scripts', ...


0

CSS links are relative to the current request URI, not your PHP file. Use an absolute path like: <link rel="stylesheet" href="<?php bloginfo( 'template_url' ) ?>/themesubfolder/style.css" />


0

As I said, I've been missing a stupid detail in my CSS, there was a fixed height for all the li. Problem solved by removing it.


1

Looks like the source of my problem is a function called admin_bar_bumpin wp-includes>admin-bar.php. It's for the admin bar and when I log out it goes away so it wasn't effecting the style of the site for logged out users. I was able to filter it out in my functions.php file. That's actually no better than adding a style to the header, but at least I know ...


2

If you output the description with bloginfo(), you can use the filter bloginfo. add_filter( 'bloginfo', 'wpse183972_description_italic', 10, 2 ); function wpse183972_description_italic( $text, $show ) { if ('description' == $show) { $word = 'WordPress'; $text = preg_replace( '^(' . preg_quote( $word ) . ')^', '<em>$1</em>', ...


0

in line 37 of your HTML-Code you have the following declaration: #header-background, #colophon, #site-navigation { background: url('') no-repeat center center fixed; background-size: cover; -moz-background-size: cover; -o-background-size: cover; -webkit-background-size: cover; } With Firebug I see, this is overwriting your CSS declaration, ...


0

I had the same problem. This is what I do: Change the YourMenuItem to your menu name item. /* Add a custom class to a specific menu item */ function my_class( $classes, $item ) { if ( $item->title == "YourMenuItem" ) { $classes[] = 'current-page'; } return $classes; } add_filter( 'nav_menu_css_class', 'my_class', 10, 2 );


0

It's probably the widget code that prints the h2 tag even if it has not value. Try searching for the code in the sidebar.php and see where it generates those tags. Most of the time, these widget codes are generated in a theme-basis and not the widgets.


0

It sounds like you are seeing a browser default. Most browsers have some styles built in by default which unfortunately often include margins and padding. A lot of developers will put a basic reset on the top of their CSS file, something like *{margin:0;padding:0;border:none} This will clear the defaults and only display margins/paddings/borders that ...


-1

Neither wp_enqueue_style() nor wp_register_style() have a parameter to allow them to be loaded in the head, rather than the footer, as their script counterparts do. The only solution is to have some of your CSS (or all of it - which would be bad) inside a style tag inside head, added with the wp_head action hook. I used this technique for a while but at some ...


0

You can not delete or ignore default styling in a child theme. You must override the declaration. .content-ver-sep { background: transparent !important; border-bottom: none !important; clear: both; height: 1px; } this should do the trick -


0

It's working, finaly. The link to the source and the code which worked out are below. http://wordpress.stackexchange.com/a/64124/69825 (Check for the Update #1 edit in the answer) It was through editing the content-single.php rather than through a filter in the functions.php file. I tried 2 or 3 recipes of each. I couldn't understand why they didn't work ...


0

This is always a problem when using a plugin that loads extra css/js files. You could add custom fields to the pages where you want to exclude css and js files (called something like page_exclude_css and _js), with comma separated style and script handlers as it's values. Then you add a function to to the wp_enqueue hooks (at a position like 9999) that ...


1

I believe the primary problem in your code is the $custom_values is set after you try to use it (and you need to use the same variable name). Otherwise, it doesn't have a value when it's in post_class(). In fact, I'm surprised you're not getting an error. That variable needs to get the value before the call to post_class. <?php $custom_values = ...


1

WordPress does remove style tags. While it allows HTML to some degree in post content, it's not really meant for full range of it. It's a content, not markup data. You could use tiny_mce_before_init filter to adjust extended_valid_elements for TinyMCE instance. See this answer on SO for some examples.



Top 50 recent answers are included