How to show only text from post in WordPress

You will need to edit the wordpress theme to do this. If you know how to do this, all you need to do is replace the_content(); with this below: <?php ob_start(); the_content(‘Read the full post’,true); $postOutput = preg_replace(‘/<img[^>]+./’,”, ob_get_contents()); ob_end_clean(); echo $postOutput; ?> And all images will be removed from your posts.

Latest post on specific category and custom css

Replace the ‘#textbox’ html with the following and css: <div class=”textbox”> <div class=”textbox_left”> <p class=”txtclhome”><?php dynamicnews_display_thumbnail_index(); ?> </p> </div> <div class=”textbox_right”> <h3 class=”titlehome”><a href=”https://wordpress.stackexchange.com/questions/166010/<?php the_permalink() ?>” rel=”bookmark”><?php the_title(); ?></a></h3> <p class=”txtclrhome”><?php the_content_limit(150, “”); ?> <a class=”morelink” href=”http://styleposts.com/?cat=41″ rel=”bookmark”><?php _e(“Read More”, ‘organicthemes’); ?></a></p> </div> </div> </div> .textbox{ overflow: hidden; } .textbox_left{ width: 60%; float: left; } … Read more

Intergrate WP into website

This code will not do anything. In order to integrate WordPress into an existing website, the best way would probably be to actually install wordpress on the site! This code just pulls up the header.

Display all Post titles with Category and Tag

As suggested in a comment, the best approach here will be to make use of a tax_query. You have much more flexibility and the ability to run more complex queries specially when you are working with more than one taxonomy (in this case category and post_tag). You can try something like this $args = [ … Read more

Function to get content by ID

Instead of using get_posts, which you would use if you wanted to retrieve multiple posts in a loop, you should use get_post, which only retrieves one post by an ID. There is also a built-in excerpt so you might want to go with retrieving post_excerpt. function get_the_excerpt_id($post_id) { $find = get_post($post_id); $excerpt = $find->post_excerpt; $excerpt … Read more

Show posts in a list separated by day

Add a variable to hold the previous post’s date, and then add a <br /> or something when it changes. <?php $prev_date=””; // initialize to empty string query_posts($query_string.’&cat=-3′); while (have_posts()) : the_post(); ?> <?php if( strlen( $prev_date ) > 0 && get_the_time( ‘M j’ ) != $prev_date ): ?> <br /> <!– or whatever you … Read more