How to load a post into an empty div tag anywhere across the pages?

You can solve this in different ways. One it’s to use simple querys with WP_Query and using the p parameter to retrive a particular post like it’s explained here. Something like this: $the_query = new WP_Query( ‘p=123′ ); while ( $the_query->have_posts() ) : $the_query->the_post(); the_content(); endwhile; Where 123 it’s the post id from where you … Read more

Custom Fields – Taller editing area

Large »Custom Field« Textareas. Gladly those are easy to target. Wrapped up in a small plugin: <?php ! defined( ‘ABSPATH’ ) AND exit; /* Plugin Name: (#65922) »kaiser« Bigger custom field textarea */ function wpse65922_big_customfield_textarea() { ?> <style type=”text/css”> #the-list textarea, #newmeta textarea { height: 200px; } </style> <?php } add_action( ‘admin_head-post.php’, ‘wpse65922_big_customfield_textarea’ ); add_action( … Read more

Store unmodified text content in database

You could refer to this: function my_formatter($content) { $new_content=””; $pattern_full=”{(\[raw\].*?\[/raw\])}is”; $pattern_contents=”{\[raw\](.*?)\[/raw\]}is”; $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE); foreach ($pieces as $piece) { if (preg_match($pattern_contents, $piece, $matches)) { $new_content .= $matches[1]; } else { $new_content .= wptexturize(wpautop($piece)); } } return $new_content; } remove_filter(‘the_content’, ‘wpautop’); remove_filter(‘the_content’, ‘wptexturize’); add_filter(‘the_content’, ‘my_formatter’, 99); Basically, what this does it alters the … Read more

Visual/Text tabs in wp editor Not Showing

Without seeing your code I can’t say whats wrong but here is a working (tested) example of a metabox with an editor inside that has the visual/text tabs. add_action( ‘add_meta_boxes’, function() { add_meta_box(‘html_myid_61_section’, ‘Meta Box Title’, ‘my_custom_meta_function’); }); function my_custom_meta_function( $post ) { $text= get_post_meta($post, ‘my_custom_meta’ , true ); wp_editor( htmlspecialchars_decode($text), ‘mettaabox_ID’, $settings = array(‘textarea_name’=>’inputName’) … Read more

Simple Plugin with custom javascript wont work – no console error

You could “borrow” the html form from the example and include this in your template – either directly of via a filter like wp_footer: <form method=”GET” action=”/javascript/search-highlight/” onsubmit=”myHilitor.apply(hilite.value); return false;”> <fieldset> <legend>Highlight Words</legend> <label>Keywords</label><span><input type=”text” size=”32″ name=”hilite” value=”search engine keywords”> <input type=”submit” value=”Apply”> <input type=”button” value=”Remove” onclick=”myHilitor.remove();”></span> </fieldset> </form>

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