New answers tagged

0

There are many differences in css files of both websites. For example, have a look at the div having class et-top-navigation by inspecting it in browser. You will find that in staging website, there is top padding and left padding applied while it is not in case of live website. Similarly check for other css changes in staging website or simply take backup ...


0

if i'm not mistaken, not all browsers are 100% compatible with RGB color codes, so it might be happening in an effort to maximize cross-browser uniformity of appearance. this could also be done to facilitate transparency effects, which might be in another option field for Jetpack. there's definitely less browser support for the extended hex use for alpha ...


0

You got javascript file and CSS file! Then you have to put those files in you child theme folder like themes -> your_child_theme_folder -> js(if you dont have js folder then create one) and place your js file here AND you have to put you css file in css folder inside your child theme. Now you need to call js file from functions.php If you dont ...


0

For editing content, I used the plugin Advanced Custom Fields. As for the conditionals, I just added if (is_page_template('template_name.php') before each wp_enqueue_script.


0

.menu-home-container { position: relative; top: 40px; } .header_mid_inner .search_wrap { position: relative; top: 40px; } .header_top_inner .meta_wrap { top: 58px; position: absolute; right: 0; z-index: 2; }


0

If you create your own shortcode based on the product category shortcode function duck_product_categories( $atts ) { global $woocommerce_loop; $atts = shortcode_atts( array( 'number' => null, 'orderby' => 'name', 'order' => 'ASC', 'columns' => '4', '...


0

Just change both lines: wp_register_script( 'wildstyle', plugins_url('css/wildstyle.css', __FILE__ ) ); wp_enqueue_script( 'wildstyle' ); to wp_register_style( 'wildstyle', plugins_url('css/wildstyle.css', __FILE__ ) ); wp_enqueue_style( 'wildstyle' );


2

You can add stylesheet in back-office, but you need for that use the admin_enqueue_scripts action. See Codex reference : https://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts


2

Wordpress provide a filter to custom logo customization. get_custom_logo is the filter. To change logo class, this code may help you. add_filter('get_custom_logo','change_logo_class'); function change_logo_class($html) { $html = str_replace('class="custom-logo"', 'your-custom-class', $html); $html = str_replace('class="custom-logo-link"', 'your-...


1

This has to work, Im using it in several projects: add_filter( 'excerpt_more', 'my_excerpt_more' ); function my_excerpt_more( $more ) { return ''; } Just copy-paste it to your functions.php. Little bonus snippet that you might need: add_filter( 'excerpt_length', 'my_excerpt_length' ); function my_excerpt_length( $length ) { return 50; } ...


0

You can use the body's classes : body.single-artist #main{ background-color:red; }


0

Textareas behave quite different to text inputs in the browser rendering engine. I cannot figure out the use case of a single line textarea without scroll bars. If you want to copy the default text input behaviour to all effects, what is wrong with using a simple input type="text" instead for your custom field? If you intend to keep the textarea multiline ...


0

Collapse the <div id="main">. I hope that you have <article> tag which id and class attributes like below <article id="post-212" class="post-212 post type-post status-publish format-video has-post-thumbnail hentry category-resources post_format-post-format-video active"> Inside the class attribute you can find the post type as type-post, ...


9

Here's one suggestion how we might try to add classes through the wp_get_attachment_image_attributes filter (untested): add_filter( 'wp_get_attachment_image_attributes', function( $attr ) { if( isset( $attr['class'] ) && 'custom-logo' === $attr['class'] ) $attr['class'] = 'custom-logo foo-bar foo bar'; return $attr; } ); where ...


5

As you found yourself the_custom_logo relies on get_custom_logo, which itself calls wp_get_attachment_image to add the custom-logo class. The latter function has a filter, wp_get_attachment_image_attributes which you can use to manipulate the image attributes. So what you could do is build a filter that checks if the custom-logo class is there and if yes ...


1

I think I found one answer. But I really wonder if this is the right way? It feels a little bit dirty somehow: I simply copied the logo related parts from wp-includes/general-template.php into my theme's functions.php and renamed the functions with some custom classes added: function FOOBAR_get_custom_logo( $blog_id = 0 ) { $html = ''; if ( ...


0

You don't need to alter the code for different formatting, you can simply use the :first-child pseudoclass in css. The foreach loop will, presumably, generate similar blocks of code, structured like this: <div class="all-my-posts"> <article class="my-slider-post"> ... </article> <article ..> </article> ....


0

The platform itself does not control responsiveness of your website. It depends on how you write the CSS code, that runs on your theme. If you have created additional CSS files, make sure to include them in main functions file of the theme with: wp_enqueue_style( 'style', get_stylesheet_uri() );


2

What I read is that the parent css was loaded after the child, so the last one wins It depends on the order in which theme developer is loading stylesheets. Normally WordPress loads child theme's functions.php first and then parent theme's functions.php. the parent Emmet theme uses CSS files called differently than Style.css Yes it does. The ...


0

In admin-bar.min.css at 600px, #wpadminbar is changed from position:fixed to position:absolute. The reason the adminbar scrolls at mobile sizes is because a fixed-height, fixed-position element causes major problems when you tap/pinch-to-zoom in mobile browsers. So, you can fix this by overriding WP's native css on #wpadminbar, but then the behaviour is ...


0

You could do this by loading the output via admin-ajax.php, but a better approach to that is to use WordPress SHORTINIT constant so you can load just what functions you need, but you will need to find and load wp-load.php to do this: // send CSS Header header("Content-type: text/css; charset: UTF-8"); // faster load by reducing memory with SHORTINIT define(...



Top 50 recent answers are included