New answers tagged

0

Well, I found the solution. The problem was with the PHP code in the plugin itself. Here is the 'additional_stylesheets' function with the code that ended up working. function additional_stylesheets() { // register and enqueue our style. wp_register_style( 'bt-wp-styles', plugins_url( 'bt-wp-styles/css/bt-wp-styles.css' ) ); wp_enqueue_style( '...


0

I don't have access to the functions.php and I was trying to solve the same issue just via frontend with the Enfold theme I was using. Like the previous answer from @DavidTaubmann, I used the same CSS edit, but that will still leave a 28px blank space at the top of the page, so here is the solution that worked for me. From your-wordpress-site.com/wp-admin ...


0

If you're using the Rife Free theme (and not the Raven theme you linked to at the top of the question) you'll see that the footer is generated by the pluggable function apollo13framework_footer_items(). You can find this by searching the files for "foot-text" as I suggested in comments. That reads the text from the footer_text option stored in the ...


0

A very basic template I created a file named about.php in a pages folder in the root of my theme with this code. You can do the same or change the location as you see fit, just dont put it inside a child folder that is in a child folder, wordpress can't read templates two levels deep it folder structure. <?php defined('ABSPATH') || exit; // Template name:...


0

I think in your case you can do it using css by adding the height: auto; to image tags: .c-entry-content img { max-width: 100%; height: auto; }


0

You could also load two different stylesheets. If you omit add_theme_support('editor_stlyes'), your stylesheet coming from add_editor_style() only applies to TinyMCE. Then enqueue your Gutenberg stylesheet with enqueue_block_editor_assets(). These styles only need to be prefixed with .editor-styles-wrapper for more specifity (which is automatically done when ...


1

remove the quotation marks so it looks like the following label[for=wwp_wholesaler_copy_billing_address] { display: none; } Try that and let me know if that works for you.


0

Here is one scenario you might want to take care of! You have multiple pages for your plugin Now you want to load your scripts and styles for those pages only! How can you do that? Solution: add_action( 'admin_enqueue_scripts', 'prefix_admin_scripts' ); function prefix_admin_scripts( $hook ){ // use // wp_die( $hook ); // get your page slugs ...


0

Let's assume you have a custom page with the name/title "Hello". and add the following code to your themes functions.php or you can also create your own plugin. Code snippet: function my_custom_page_category_hide(){ $page_title = $wp_query->post->post_title; if($page_title=="Hello"){ echo '<style> .box-...


2

There's nothing like that with media queries. You need to include the exclusion in your CSS selectors, like this: body:not(.home) .site-header { // etc. } Alternatively, if this is the only CSS in a particular file, you could just not enqueue it on the homepage: add_action( 'wp_enqueue_scripts', function() { if ( ! is_front_page() ) { ...


1

this function get_stylesheet_directory_uri() return URI to current theme's stylesheet directory and /css/my-admin.css is path to their file which you can create in your theme directory example : <link rel="stylesheet" type="text/css" id="my-css" href="https://yourdomain.com/wp-content/themes/yourtheme/css/my-admin.css&...


1

/css/my-admin.css is located in the current theme directory as specified from the return value of get_stylesheet_directory_uri() prepended to this path.


0

You can not delete style.css and have a functioning theme (at least without hacking WordPress core files). All the theme meta information is written in the style specifically. You can, however register another css file named my-style.css or whatever the name you want. function my_theme_css() { wp_enqueue_style( 'my-style', get_template_directory() . '/my-...


1

Your theme must contain a style.css file, and it needs to have a comment at the top with the theme details. https://developer.wordpress.org/themes/basics/main-stylesheet-style-css/


1

While you can not use CSS to detect Custom font sizes they can be disabled using this code: add_theme_support( 'disable-custom-font-sizes' ); Then, to have more control over how the look of font sizes are, we can use: add_theme_support( 'editor-font-sizes', array( array( 'name' => 'Small', 'slug' => 'small', ...


1

.postid-209506, .postid-209512, .postid-209513 { background-image: url('.jpg'); } .postid-209506 .entry-title, .postid-209512 .entry-title, .postid-209513 .entry-title{ display: none; } .postid-209506 .entry-header #entry-meta, .postid-209512 .entry-header #entry-meta, .postid-209513 .entry-header #entry-meta{ display:none; }


0

function load_my_plugin_scripts( $hook ) { // Load only on ?page=ticket-dashboard if( $hook != 'toplevel_page_ticket-dashboard' ) { return; } // Load style & scripts. wp_enqueue_script( 'tickets_script', get_template_directory_uri().'/js/tickets.js', array('jquery-ui-tabs'), '1.1' ); // Need to add dependency on Array so your custom js will load once ...


0

Modify this according to your need, works like a charm, generates random version number each time you reload the page, perfect for development : wp_enqueue_style('mypluginstyle', plugins_url('/assets/mystyle.css', __FILE__), array(), rand(111,9999) );


0

When you right-click on each element and click on edit it brings up the block and you can select: Content, Design, Advanced. Design has the colors and the hover effects. You just need to turn it off on one and copy and Paste Style to the rest of the blocks.


0

I guess it doesn't matter where on the page the pop-up HTML goes? You can hook the wp_footer action, which is normally called at the bottom of the page just before the </body> close tag. That's probably the right place to write your pop-up's div etc. You can add extra CSS and JavaScript to the page using wp_enqueue_style and wp_enqueue_script, which ...


0

I found a small solution BUT its not the best instead of what you ask! You can create an custom page template in your theme or child theme https://www.wpbeginner.com/wp-themes/how-to-create-a-custom-page-in-wordpress/#manual And paste the code: https://www.w3schools.com/howto/howto_js_alert.asp <!DOCTYPE html> <html> <head> <meta name=&...


0

Maybe you can use CSS to make more space between the image and the title, with a margin to the image and also overflow: hidden to the image.


Top 50 recent answers are included