automatically create taxonomy with same name as post title
Can you not just call get_the_title() to get the title of the Country Story? $cat = get_the_title($post_ID);
Can you not just call get_the_title() to get the title of the Country Story? $cat = get_the_title($post_ID);
you can use global $current_user; get_currentuserinfo(); and then add ‘post_author’ => $current_user->ID to your $new_post array. then you can use <p>Posted by: <?php the_author(); ?></p>
The issue is that you are declaring a same ID for every DIV in the LOOP. What you need is to do something like this: <ul id=”slider2″> <?php $args = array( ‘post_type’ => ‘jobs’, ‘posts_per_page’ => 15 , ‘order’ => ‘ASC’ ); $loop = new WP_Query( $args ); $i = 0; ?> <?php while ( … Read more
By default images already have unique class’s but this depends on your theme. Use firebug and hover over the images and you should see stuff like class=”aligncenter size-full wp-image-1525″. If you want to change the class or id or alter any attributes of the image you can use the get_image_tag filter. For example, add_filter(‘get_image_tag_class’,’my_custom_class’); function … Read more
Show Custom Taxonomy Categories, Listing of Posts, and Single Post via AJAX
Just guessing here, but I suspect that query_posts() is not appropriate in this situation. query_posts() should only be used to modify the main query, and the emerging best practice is that query_posts() shouldn’t be used at all, but, instead, replaced by filtering pre_get_posts. Having said all that, I would look into WP_Query and particularly the … Read more
First of all in your image you can see that WordPress lets you filter the posts by category, just bellow the what you have added to the image, But if you want to know how you can add your own link to the filter you can use the views_edit-post filter hook ex: add_action(‘pre_get_posts’, ‘query_add_filter’ ); … Read more
<meta property=”og:image” content=”http://alexchen.info/taiwantalk/wp-content/uploads/2011/03/cheating.png” /> Visit http://developers.facebook.com/docs/reference/plugins/like/ and see “Step 2 – Get Open Graph Tags” There’s also a lot of WP plugins out there that can help you to generate Open Graph tags.
Try this function: url_to_postid( $url ); The WordPress codex is your friend. A quick Google search could have provided the answer.
MOST IMPORTANT EDIT When I tested your code, I always added the page header name, and never realized that this was one thing that you didn’t add. You should always name a custom page template so that wordpress knows it’s a page template. So you need to edit your custom page template and add the … Read more