Template tag for /page/# structure

WordPress provides is_paged() which returns true on any archive or blog that stretches over multiple pages. This isn’t what you want, but the is_paged Codex article tells us where to go: If you need to check which page of the blog you are on, you can look in $wp_query->query_vars[‘paged’]. Remember that inside functions you might … Read more

$_POST[‘message’] gives a 404 [duplicate]

To insert a post into the WordPress database, whether you are doing it as a logged in user to the current WordPress installation or over XML-RPC (or any other remote methodology) you need to be using something along the lines of; $the_post = array( ‘post_title’ => ‘Post Title’, ‘post_content’ => ‘My post content’, ‘post_status’ => … Read more

WordPress Plugin Receive a Link

You could, feasibly, do it with a custom field, ignoring ajax. You could store the ratings of each one in an array in the field. The star rating would be generated something like this: //note this is untested and provided as a guide not gospel $ratings = get_post_meta($post_ID,’star_ratings’); $total = 0; foreach($ratings as $rating) { … Read more

get_posts displaying wrong permalink for “continue reading” link

You need to reset the post data after your get_posts loop since your calling setup_postdata. It would be better to remove the setup_postdata all together. global $post; $recent_posts = get_posts( $yourargshere ); foreach($recent_posts as $post) : $return = ‘<h4 class=”recent-post-title c0″>’ . $post->post_title . ‘</h4>’; $return .= ‘<p class=”recent-content c0″>’ . apply_filters( ‘the_excerpt’, $post->post_excerpt ) … Read more

WordPress redirect on login

I think getting the site to redirect to the proper location on login would only be the beginning of your issues with this setup. What would happen when you want to use any WordPress function to retrieve the site url? You would possibly have to re-write those functions as well, so that they return the … Read more