How to limit post content and remove image caption from it

Image captions in WordPress are actually shortcodes. Shortcodes are applied by the filter: $content = apply_filters(‘the_content’, $content); For example, WordPress creates the following code in your content when you enter an image caption: You need to still use apply_filters() in order to properly display content. (safe content display and all other shortcodes) If you don’t … Read more

append_content help

Edited, try this <?php function parse_twitter_feed($feed, $prefix, $tweetprefix, $tweetsuffix, $suffix) { $feed = str_replace(“&lt;”, “<“, $feed); $feed = str_replace(“&gt;”, “>”, $feed); $clean = explode(“<content type=\”html\”>”, $feed); $amount = count($clean) – 1; $output = $prefix; for ($i = 1; $i <= $amount; $i++) { $cleaner = explode(“</content>”, $clean[$i]); $output .= $tweetprefix; $output .= $cleaner[0]; $output .= … Read more

How do I make certain areas editable?

These links should help you: http://codex.wordpress.org/The_Loop http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items with this two techniks you can give your client the ability to change the content and the navigation. For these you have to edit your theme and insert the snippets on the placese you want to output your contents…. For the footer you can use a custom page … Read more

Host wp-content on other domain, much like a CDN

In WordPress Dashboard > Settings > Media and fill the field “Full URL path to files” with your other domain. See the screenshot below: EDIT: I thought it would be obvious, but it isn’t. Here’s what you exactly need to do: You should map your domain to point to: public_html directory, IF it’s also your … Read more

Show content after the first and second paragraph

My way to do this (see update below): function addParagraphs($content) { // you can add as many as you want: $additions = array( ‘<p>After 1st paragraph</p>’, ‘<p>After 2nd paragraph</p>’ ); $content = get_the_content(); $output=””; // define variable to avoid PHP warnings $parts = explode(“</p>”, $content); $count = count($parts); // call count() only once, it’s faster … Read more

Get Content From Blog Page

You are using get_the_content() wrong, it can’t take a ID, which is what get_option(‘page_for_posts’) does return, and generally gets the content of the current post inside the loop, in which it has to be used. To get the actual content of that page you can do: $page_for_posts_id = get_option( ‘page_for_posts’ ); $page_for_posts_obj = get_post( $page_for_posts_id … Read more

Split content into multiple columns using more tag?

Why not just create a few shortcodes for what you need? you can create columns for all kind of uses,, add this to your themes function.php file.. <?php function yourtheme_one_third( $atts, $content = null ) { return ‘<div class=”one_third”>’ . do_shortcode($content) . ‘</div>’; } add_shortcode(‘one_third’, ‘yourtheme_one_third’); function yourtheme_one_third_last( $atts, $content = null ) { return … Read more

techhipbettruvabetnorabahisbahis forumutaraftarium24edusedueduedusedusedusedusedueduedu