Articles show some of text [duplicate]

Chances are your home page is using the_content. Use the_excerpt instead. The template your home page would be using is either index.php, or front-page.php. Refer to the Template Hierarchy image for more information.

After the local installation of an old WP website I can see the homepage but I can’t access to the articles, why?

Depending on if permalinks worked on your local server before the import or not you ether need to update the .htaccess in your wordpress root, or you need to enable rewrites all together in Apache. What operation system do you use? This is a good guide if you use linus: https://www.digitalocean.com/community/articles/how-to-set-up-mod_rewrite

Post dynamic fields and style

Just use a custom field. On post or page edit page click Screen Options in the top right corner anb select Custom Fields. Add a Name and Value pair for example: price (for the name) and 9$ (for the value). Then in your single.php or whatever template use this code to display it: <?php echo … Read more

Get posts after calculating meta key

Assuming meta_count is another column in your postmeta table below query should get you the posts based on meta_value/meta_count calculation. $postids=$wpdb->get_col( $wpdb->prepare( “SELECT post_id FROM $wpdb->postmeta ORDER BY (meta_value/meta_count) LIMIT 10 ” ) ); The result $postids would be an array. You will have to declare $wpdb as a global variable before you use this … Read more

How to make “my posts” page

I think this is what you are looking for: function my_posts_shortcode_wpse_135655() { if (!is_user_logged_in()) return; global $current_user; get_currentuserinfo(); if (!empty($current_user->ID)) { $userp = new WP_Query( array( ‘post_author’ => $current_user->ID, ) ); $content=””; if ($userp->have_posts()) { while ($userp->have_posts()) { $userp->the_post(); $content .= get_the_title(); } } else { $content .= “You don’t have any posts.”; } wp_reset_postdata(); … Read more

The page that displays Posts on homepage

The way you are thinking wordpress is, is not like that. You can’t find the query and alter it like you do in plain PHP. There are filters and actions and a whole architecture to play with pages and posts. I suggest you to read wordpress documentation and Codex. If you are a programmer then … Read more

Excerpt all post content Content Same Size without word cutting off

I use wp_trim_words to create multiple excerpts. I always abuse it when I need more than one excerpt length. Here is how function wpse_custom_excerpts($limit) { return wp_trim_words(get_the_excerpt(), $limit, ‘<a href=”‘. esc_url( get_permalink() ) . ‘”>’ . ‘&nbsp;&hellip;’ . __( ‘Read more &nbsp;&raquo;’, ‘wpse’ ) . ‘</a>’); } What this function do is taking get_the_excerpt trimming … Read more

Tag page that displays specific posts

Create tag.php & save it in your theme directory. This is a default behavior of wordpress. So you don’t have to struggle with it. <?php if ( have_posts() ) : // Start the Loop. while ( have_posts() ) : the_post(); // Do your stuff here such as below the_title(); the_content(); endwhile; else: echo ‘No Post … Read more