Redoing home page but changes not taking effect

I assume you are not editing the proper template file. Editing the home page can be a bit tricky in WordPress, some times. WordPress uses different templates depending on the situation to render the home. These templates can be: front-page.php // Overrides all home.php // For latest posts page.php // For static pages as homepage … Read more

Adding external stylesheet after ALL other styles

It’s not elegant but it works. Add these lines to functions.php: ob_start(); add_action(‘shutdown’, function() { $final=””; $levels = ob_get_level(); for ($i = 0; $i < $levels; $i++) { $final .= ob_get_clean(); } // append styles just before </head> $final = str_replace( “</head>”, ‘<link rel=”stylesheet” src=”https://wordpress.stackexchange.com/questions/271293/mycss.css”></head>’, $final ); echo $final; }, 0); Alternatively you can move … Read more

How can i add note, caution, warning quote inside the text? [closed]

You can hook into the_content filter and add your note after every post. Then you can style it to have a nice quote. add_filter(‘the_content’,’add_my_note’); function add_my_note($content){ // Write your note here $note=” <div class=”my-note”> <h3>Note Header</h3> <p>Note body</p> </div>”; // Append the note to the content $content = $content . $note; // Return the modified … Read more

Using uncss or similar with WordPress?

It is unlikely to ever work in a dynamic enviroment like wordpress, where css rules might be applied based on changes in the content. For example addition of a widget, aligning an image, etc. (that said, I wish wordpress themes would stop cramming 1M of CSS rules into one file instead of breaking it up … Read more

Slider loading issue

This is standard behavior with javascript that is deferred or loaded in the footer. All the slides load in, and don’t get told to “be sliders” until the whole page has loaded. You can hide them with CSS first: #section-slider .single-slide-wrap { display: none; } And you can have the first slide be shown if … Read more

WordPress Admin Bar Covering & Overlapping Fixed Menu Header [closed]

One solution to your problem is hiding admin bar from front-end. Maybe there is problem in your css too. To hide admin bar from front-end: To remove the toolbar from your site, go to Users > Your Profile. Scroll down to “Toolbar” and uncheck “Show Toolbar when viewing site.” Add add_filter(‘show_admin_bar’, ‘__return_false’); to functions.php of … Read more

Show enqueued CSS and Script in custom header

So all we need to do is to check, what exactly WP is doing during wp_head and mimic that behavior… In wp-includes/default-filters.php (line 244) you can find: add_action( ‘wp_head’, ‘_wp_render_title_tag’, 1 ); add_action( ‘wp_head’, ‘wp_enqueue_scripts’, 1 ); add_action( ‘wp_head’, ‘wp_resource_hints’, 2 ); add_action( ‘wp_head’, ‘feed_links’, 2 ); add_action( ‘wp_head’, ‘feed_links_extra’, 3 ); add_action( ‘wp_head’, ‘rsd_link’ … Read more