how many visitor open this post? [closed]
The simplest solution would be by using a plugin. For instance: http://wordpress.org/extend/plugins/baw-post-views-count/. Your CSS has nothing to do with it
The simplest solution would be by using a plugin. For instance: http://wordpress.org/extend/plugins/baw-post-views-count/. Your CSS has nothing to do with it
Missing global ? global $post; No global variable available if you are using publish_post action hook! Ref : http://hungred.com/how-to/tutorial-post-id-publishpost-action-hook-wordpress/ Update 2 : or try this $author = get_userdata($post->post_author); So you can use $author where you will 😀
they probably use the_excerpt(); on the front page. Read the whole thing here: http://codex.wordpress.org/Function_Reference/the_excerpt
you need to change the_content(‘Read more’); to the_excerpt(); Then in your functions.php file add_filter(‘excerpt_more’, ‘custom_read_more_link’); function custom_read_more_link($more) { return ‘<a href=”‘get_permalink().'”>Read More</a>’; } Also make sure that you’re calling wp_reset_query() after the while loop. This will achieve what you’re trying to do. A personal suggestion: Please don’t use query_posts, instead create a new instance of … Read more
Something like (in your single.php) <?php while (have_posts()): the_post(); ?> <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> <time class=”post-time” datetime=”<?php the_time(‘Y-m-d’); ?>”><?php the_time(‘F j, Y’); ?></time> <?php if (has_post_thumbnail()): ?> <?php $thumbnail_image = get_posts( array( ‘p’ => get_post_thumbnail_id($post->ID), ‘post_type’ => ‘attachment’, ) ); ?> <p class=”thumbnail-caption”> <?php echo $thumbnail_image[0]->post_excerpt; ?></p> <?php the_post_thumbnail(‘full’); ?> <?php endif; … Read more
function filter_where_older( $where=”” ) { $date = get_the_time(‘Y-m-d H:i:s’); $where .= ” AND post_date < ‘$date'”; return $where; } function filter_where_newer( $where=”” ) { $date = get_the_time(‘Y-m-d H:i:s’); $where .= ” AND post_date > ‘$date'”; return $where; } $category = get_the_category(); if(!empty($category)) { $cat_id = $category[0]->term_id; add_filter( ‘posts_where’, ‘filter_where_older’ ); // retrieve older posts from … Read more
It sounds like you need to override the $more default. Do this: <div class=”entry-summary”> <?php global $more; $more = 0; the_content(); ?> </div> It is a solution pretty much straight from the Codex.
You should consider using the AJAX API. Once you get the hang of it, it is easier and saves you a lot of headache. You question specifically: Your Lightbox should produce identifiable markup that you can use to hide the elements you don’t want, much like you’d create a printer friendly page. I don’t specifically … Read more
Refer to the Template Hierarchy for attachment post types: `$mimetype.php $attachment.php single-attachment.php single.php index.php So for an image attachment, name your template file image.php. Then, to link to the single post view for an attachment, you would link to it like any other post: get_the_permalink( $postid ).
The code below is the correct code, in several different PHP files. Currently need to know how to write it using the the_author_posts_link(); <p class=”postAuthor”>By <a href=”https://wordpress.stackexchange.com/questions/74001/<?php the_author_meta(“user_url’); ?>”><?php the_author(); ?></a></p> Just replace this: <a href=”https://wordpress.stackexchange.com/questions/74001/<?php the_author_meta(“user_url’); ?>”><?php the_author(); ?></a> With this: <?php the_author_posts_link(); ?> Alternately, you could use this: <a href=”https://wordpress.stackexchange.com/questions/74001/<?php echo get_author_posts_url(get_the_author_meta(“ID’ )); … Read more