adding the_custom_logo(); to header

The biggest issue you’re running into is putting the_custom_logo() inside of an <img> tag. The function already outputs a full image tag, plus a link to the homepage wrapped around it. So, replace this <a class=”navbar-brand” href=”#” > <img src=”<?php the_custom_logo(); ?>” height=”42″ width=”42″> </a> with this <?php the_custom_logo(); ?> to get rid of the … Read more

Change text color dynamically in WordPress [closed]

If you inspect the text, you’ll see that your theme’s CSS is overriding your custom CSS. You have h2 { color: white; } but your theme has .widget h2 { color: inherit; } so “inherit” wins out. If you change your own CSS to .widget h2 { color: white; } it will override the theme. … Read more

How to change the settings of a video? [closed]

My coding skills are very minimal, and I can’t seem to find & edit the HTML. This is because video embeds are usually implemented using a shortcode, there is no HTML to edit, it’s generated on the fly Starting playing automatically WITHOUT the user having to click any sort of play button. yes and no… … Read more

get_template_directory_uri() generates wrong path

Do your URL change up in phpMyAdmin with SQL language: # Change website url UPDATE wp_options SET option_value = replace(option_value, ‘http://www.old-site.com’,’http://www.new-site.com’) WHERE option_name=”home” OR option_name=”siteurl”; # Change GUID URL UPDATE wp_posts SET guid = REPLACE (guid, ‘http://www.old-site.com’,’http://www.new-site.com’); # Change url of medias, post, page, etc. UPDATE wp_posts SET post_content = REPLACE (post_content, ‘http://www.old-site.com’,’http://www.new-site.com’); # Change … Read more

How to add animation the featured image?

Your theme might already have an animation feature, you can just add the class. You can add a plugin like so..https://wordpress.org/plugins/animate-it/ and add the class to the featured image property for it to work. If you use a builder (like Elementor) you can easily create your layouts and add animations to each element.

wp_enqueue_media is not loading styles

There are some wp-admin styles you need to load. Since I cannot find any way to let wp_enqueue_style() accept url parameters, so I load styles by wp_head hook function here. add_action( ‘wp_head’, ‘load_admin_media_styles’, 10); function load_admin_media_styles(){ // list all style libs the post page of wp-admin loaded, but we may only need to load 2 … Read more

Trying to hide a button on a specific WordPress Page ID

so if you want to remove/hide only the button can do this: 1 – if you have a specific class that hide a element //$class = “youre class”; <button class=”<?php if(is_page($page_id)){ echo $class } ?>” onclick=”window.location.href=”https://example.org/about/”;”>About Me</button> 2 – inline style <button <?php if(is_page($page_id)){ echo “style=”display: none”; } ?>” onclick=”window.location.href=”https://example.org/about/”;”>About Me</button>

Keep comments but turn off commenting

What you’re describing is theme specific. The default themes don’t do this, and instead simply state that comments are closed: If comments are turned off, they change the comment form. But your theme appears to change the entire comment section instead of just the form. You’re going to have to either modify your theme or … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)