Tag Info

New answers tagged

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.


0

I don't think there's a built-in safe way to do this, but you could directly modify the $wp_styles global after things are registered but before they're output, or at least use it to fetch the parameters a style was originally registered with. global $wp_styles; if( isset( $wp_styles->registered['a_stylesheet'] ) ){ ...


0

It's this right here. Make that 100% or take it away and it works as you thought it should. edit: I'm not sure I answered on the right thing afterall. But this will fix the one/two pixel gap between the left hand navigation against the picture on the right. edit2: Yeah, it was what I thought, and the other fix does the same thing as well.


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


0

You need a colon after "max-width". So your media query should look like @media screen and (max-width: 600px){ insert styles here } Also, responsive themes are very much so still a thing. I wouldn't create a theme without it being responsive. It's pretty standard nowadays. Definitely do not abandon it.


0

You could add custom quick tags (for the text editor) easily as follows function wpse182089_add_float_quicktags() { if (wp_script_is('quicktags')){ ?> <script type="text/javascript"> QTags.addButton( 'floatr', 'float right', '<span style="float: right">', '</span>', '', '', 41 ); QTags.addButton( 'floatl', ...


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


0

My previous answer is overly complicated and potentially doesn't respect the parent theme's dependency chain (see note in other answer). Here's another much simpler take that should work much better: function use_parent_theme_stylesheet() { // Use the parent theme's stylesheet return get_template_directory_uri() . '/style.css'; } function ...


0

You can try to dequeue the plugin stylesheet, then re-enqueue the stylesheet with your theme stylesheet added as a dependency which will ensure that the plugin stylesheet is loaded after your theme stylesheet. function custom_style_order() { if ( defined('JOB_MANAGER_PLUGIN_URL') ) { //dequeue the original plugin stylesheet by its handle ...


0

The easiest way, if this should only be added to some of the links; Insert the link, then switch to the HTML tab in the editor. Find your link in the source code, add class="your-class" and you're done.


0

Is it possible? Sure. You just need to re-declare the wpLink function that generates the link from the button. For example like this function wpse_181706_overwrite_wpLink() { if (wp_script_is('quicktags')){ ?> <script type="text/javascript"> var wpLink;!function(e){var t,i,n,s,l={},a={},r="ontouchend"in ...


0

If you mean all links, you can style the links using the "a" tag in CSS. In the last example below I have specified a visited link. p a:link { color: #000000; } p a:visited { color: #000000; }


5

Here is another CSS-only approach, without any inline-PHP and needless CSS-spam in the head. If your theme is correctly using body_class() and a user is logged in, Wordpress adds a class "logged-in" to the body-element, so we can use this in our stylesheet: <--logged out--> .sellertitle { float: none; width: 49%; } .otherseller { display: ...


1

you could try something like this... this will add css on the head add_action('wp_head', 'add_css_head'); function add_css_head() { if ( is_user_logged_in() ) { ?> <style> .sellertitle { float: left; width: 49%; } </style> <?php } else { ?> ...


0

I recommend a tool like firebug (http://getfirebug.com/). It will give you the precise values and locations of the applicable css-styles in your style.css. If you use the same file in both installations there should be no differences except for different content or different devices.


0

CloudFlare was caching my CSS files. I diagnosed this by selectively purging the CSS file from the cache, and then solved the issue by turning on "Development Mode", all via the CloudFlare dashboard.


0

Its an old bug in Chrome. In order to solve your problem though - you just need to add this CSS (append to the one you already have in place): .fleche { float: none !important; vertical-align: top; } With inline-blocks - you don't need floats to keep them on the same line.


1

Give this a try? function oddeven_post_class ( $classes ) { global $current_class; $classes[] = $current_class; $current_class = ($current_class == 'odd') ? 'even' : 'odd'; return $classes; } add_filter ( 'post_class' , 'oddeven_post_class' ); global $current_class; $current_class = 'odd'; and be sure you're using <?php post_class(); ?>


1

You'll want to use a PHP if statement in combination with is_user_logged_in If you're editing your header try this: <?php if (!is_user_logged_in()) { ?> // Your social media icons code goes here <?php } ?> The exclamation point before is_user_logged_in() means 'is not' in PHP, so your code essentially says, "If the user is not logged in, show ...


2

As far as I've seen you're missing bootstrap CSS grid markup inside your page div, so to start add container class to page div and below that a .row element, for more inforamation on how the Bootstrap grid works check documantation and remember that all Js and styles are based on the correct markup selectors_


0

You are correct that this is definitely a CSS issue. To get the 3rd level menu to show up fully, you'll want to target it and move it X number of pixels from the left until it lines up correctly. If your sub-menu's have a set width, then use that set width to move the 3rd level into the correct position. For example if my sub-menu's had a fixed width of ...


1

...there's no way to include the style in Wordpress posts, at all? You need to add the style tag to the list of allowed post tags, and also ensure TinyMCE recognises it in the editor: function wpse_180472_wp_kses_allowed_html( $tags, $context ) { if ( $context === 'post' ) $tags['style'] = array(); return $tags; } add_filter( ...


0

Instead of using style background:red; use color:red; like the following. $message = str_replace('{eventlinkURL}',$eventlinkURL,$message); echo "<span style='color:red;'>".$message."</span>";


1

do not use <font> html tag, it is old and i'm not even sure if can work in modern browsers. instead use <span> (for inline text) or <p> (for paragraph). php and html can work together but there's an appropriate way to write it. generally speaking, html code is wrapped with double quotes "html" and php with periods .php.: echo "html code ...


1

I've found the solution to the problem myself. for anyone out there, surround your header call with the conditional 'is_product_category( 'day' )'. you can read more about it here: http://docs.woothemes.com/document/conditional-tags/


0

Given the amount of customization you're looking to make, your best bet may be to integrate a custom Walker function. From the Codex: For deeper conditional classes, you'll need to use a custom walker function (created in the 'walker' => new Your_Walker_Function argument). The easiest way to build a new walker function is to copy the default ...


0

I have had this issue before, the best solution is creating custom divs for the buttons and styling them differently overiding the defaults. This approach gives you control when you are theming and also helps you control different button colors and hover effects especially when you want to have a different color for each button.


0

You might wanna check : https://wordpress.org/plugins/tabsy/ . It's a responsive tab and shortcode ready so you don't have to add the code manually. I hope this helps. Thanks! Cheers, phpbits



Top 50 recent answers are included