Tag Info

Hot answers tagged

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


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


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' );


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

I had a very similar issue. I needed to target a specific wp_nav_menu() and replace the a links with a class. Here is my solution in reference to the OP: function theme_add_menuclass( $classes, $args ) { if ( $args->theme_location == 'your-menu-location' ) { return preg_replace( '/<li /i', '<li class="your-class"', $classes ); } ...


1

This isn't a WordPress issue, although it IS an easy CSS fix. The small space between the end of image and the slideshow is axtually 2 pixels wide and caused by the #left-area div. You can just up the width by 2 pixels on #left-area. Like this: #left-area { width: 639px; } It is currently 637px. You could also up the padding-left by 2 pixels to ...


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.


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



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