Tag Info

New answers tagged

2

First thing to mention is that you don't need to use wp_register_style if enqueuing within the same function. You can replace it with wp_enqueue_style and remove the duplicate. As for why your stylesheet isn't loading, start by checking the file path. Try this instead: wp_enqueue_style('cl-chanimal-styles', plugin_dir_url( __FILE__ ) . ...


1

You can set the priority in hook. Priority is the 3rd parameter in the hook. In the following example, wp_enqueue_scripts will have priority of 99 which is higher than normal priority. Default priority is 10. So it will load at last function load_last_style() { wp_enqueue_style( 'style-name', get_stylesheet_uri() ); } add_action( 'wp_enqueue_scripts', ...


1

You can use Advanced Tinymce plugin to solve your problem. This plugin enables the advanced features of TinyMCE, the WordPress WYSIWYG editor. It includes 15 plugins for TinyMCE that are automatically enabled or disabled depending on what buttons are chosen. You can see demo here.


0

As suggested, just add a container around the content. You do not want to str_replace() or preg_replace() your markup. It is resource expensive and prone to error. So... <div class="html-content"><?php the_content(); ?> </div> Then... .html-content a { } In fact, chances are you already have markup in your theme similar enough to ...


1

you can use: add_filter('the_content', 'addClassToLinks'); function addClassToLinks($content){ return str_replace( '<a ', "<a class='myclass'", $content); } But i don't recommend it. Just add in theme an specific class for container of the content. It is cleaner and use in css: .myclass a { // css for a that is fount inside myclass }


1

It would be more efficient to add a container with a certain class name around content that has been created with the HTML tab. That way you're avoiding the code getting bulky.


0

If you want the absolute path to your theme's stylesheet directory you could use get_stylesheet_directory(). If you want the URI of your theme's stylesheet directory you could use get_stylesheet_directory_uri(). get_theme_root() will return the absolute path to the themes directory. get_home_path() will return the absolute filesystem path to the root of ...


0

Flexbox is an easy way to do this. <div class="row"> <div class="col">...</div> <div class="col">...</div> </div> CSS: .row { display: flex; /* equal height of the children */ } .col { flex: 1; /* additionally, equal width */ } You can find some other methods here: ...


0

The issue is with the slider. The one you are currently using is Flexslider and the hidden positions of the navigation arrows are what's causing the problem. On iPad try tapping the slider so the nav arrows move into view. To fix this you could just add overflow: hidden; to the .flexslider class in your CSS.


0

Alignleft looks like it's behaving itself exactly as it should: aligning the image left and the text to the right of it. If you want your left aligned images to behave the same way as you 'align none' image, simply go to your style.css and remove 'float:left' from your .alignleft code: .alignleft { float: left; margin:0 1em 1em 0; } You can also change ...


0

It's now WordPress, it's your CSS: #devn-320955 is missing the class of .container_full. #devn-413264 needs a clearfix or overflow:hidden.


1

Allowing user to control code is explicitly unsafe operation. As you note the purpose of sanitization is pretty much to not let user slip in anything executable and/or with malicious intent. To "sanitize" executable code you would need programmatic understanding of it (code parser) and criteria engine to distinguish what is safe and what is not. For such ...


0

You can try this in your plugin files. <?php add_action('wp_footer', 'styles_at_extremely_end_of_the_page', PHP_INT_MAX); function styles_at_extremely_end_of_the_page() { ?> <style> /* Your Custom CSS here */ </style> <?php }


0

In short, as of WordPress 3.3 use wp_enqueue_scripts to load JS and CSS. wp_print_styles has/had some minor bugs with it (namely, it may include your scripts in the admin as well) - here and here are some more details on all of that. It doesn't sound like there's any major security flaws or theme breaking here, just better practice to use wp_enqueue_scripts. ...


2

Good Day aparente001, I too had the same problem as you are referring to, so I know exactly what you are talking about. So to answer your question: Do I need to go through each of those cases and provide detailed css changes, or is there a more elegant way? You will have to go through creating a Child Theme (as you did already) of your current Twenty ...


0

I just wanted to modify some of the text so I was able to filter gettext using this code put into mu-plugins/my-functions.php. It will NOT work putting this into a regular plugin, but you can put it into functions.php of your base theme. function rgbook_activate_page_action() { add_filter('ngettext', 'rgbook_activate_page_change_text' ); ...



Top 50 recent answers are included