Hide specific content from excerpts

Ok, I’ve found the answer myself through a lot of Googling 🙂 If anyone else is struggling, this pastebin provides a solid solution for stripping out headings from the excerpts. The solution was provided by Michael at the WordPress Support Forum.

Can somebody tell me how I am supposed to be using blogs.dir for network / MU sites?

blogs.dir was the way to handle specific blog plugins and themes when it was WordPress-MU but since version 3 came out and the WordPress-MU was integrated into WordPress Core and introduced WordPress Multisite, that’s no longer the story. WordPress Handles the creation of the new blogs/sites in the database and mainly in the background so … Read more

Get the content inside shortcode and apply external function to it?

The following adds the shortcode [my_t_shortcode], which accepts an attribute ‘lang’, and applys the above mentioned function to the content. //Add shortcodes add_shortcode( ‘my_t_shortcode’, ‘wpse41477_shortcode_handler’ ); //It’s good practise to make sure your functions are prefixed by something unique function wpse41477_shortcode_handler( $atts, $content = null ) { //This will extract ‘lang’ attribute as $lang. You … Read more

Disable external (3rd party) CALL (images,fonts..) in Dashboard

There’s no such constant in WordPress core that would allow you to that. As plugins and themes can do pretty much anything, it’s hard to detect such external calls. Also, only very few users actually run WordPress on a local install (mainly developers). Thus, this is not suitable for core according to the project’s philosophies … Read more

How to make search and replace in content through php

From the documentation of WP All Import, the pmxi_saved_post action takes one parameter, $id, which is “the ID of the post/page/Custom Post Type that was just created.” So, your post_saved() callback should look like this: add_action(‘pmxi_saved_post’, ‘wpse246838_post_saved’, 10, 1); function wpse246838_post_saved( $id ) { $my_post = array( “ID” => $id, “post_content” => “1”, ); wp_update_post( … Read more

Conflicting post edit options under dashboard

Columns can be hidden from view using the screen options tab. On the upper right hand side of the dashboard click screen options Un check any of the columns you want to hide. Normally the edit options are displayed as horizontal text. A plugin or other function has changed this.

content gets scrambled

This is because the images are defined as floating to the left. To solve this, you can add a clear: both to the <h4> elements (it probably won’t hurt to do this in the stylesheet – will there be a situation where you need a title that exists next to a float?).

Output string using php printf

the_content() prints it output to screen. What you want is to return that output and assign a variable to it. You should note, although get_the_content() do exactly what you want, it only returns unfiltered content, and not filtered content like the_content(). You should manually add those filters, which is real easy. You can do the … Read more

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