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

Neither the_excerpt() nor the_content() works properly?

Your requirements slant towards using the_excerpt() with adding read more link by custom code: print 55 words – already this by default and adjustable via excerpt_length filter but react to <!–more–> – this already happens, auto-generated excerpt cannot be longer than teaser (part from start of post to <!–more–> tag) and if manual excerpt is … Read more

Hook for URL Request

Actually, my recommendation would be to do things a bit differently. You can add a custom rewrite endpoint to WordPress to handle these files specifically. For example, the URL http://site.com/download-xml/the_filename would automatically download the specified file as an attachment. First, you need to add a custom rewrite endpoint to set this up: function add_endpoint() { … Read more