Post being scheduled that shouldnt be schedulded
Post being scheduled that shouldnt be schedulded
Post being scheduled that shouldnt be schedulded
custom post types, pre_get_posts, wp_list_categories
I’m not sure I understand your question, but I think you’re asking how do you create a post from a form thats submitted by a user? These tutorials might help: http://wp.tutsplus.com/tutorials/allow-users-to-submit-images-your-site/ or http://wp.tutsplus.com/tutorials/allow-users-to-submit-to-your-wordpress-site-a-quotes-plugin/ It shows how to create post from a forms input. For the conditional part, if you want them to be logged in … Read more
<div class=”col-md-4″> <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> <header class=”page-header” style=”border-bottom:none; margin-bottom:0;”> <div style=”margin-bottom:5px;”> <a href=”https://wordpress.stackexchange.com/questions/125845/<?php the_permalink(); ?>” rel=”bookmark”> <?php if ( has_post_thumbnail() ) { the_post_thumbnail(‘col-6-thumb’); } ?> </a> </div> </header> <div class=”article-info”> <div class=”article-date”><h3><?php the_time(‘M jS’) ?></h3></div> <div class=”articletitle”><h3><a href=”https://wordpress.stackexchange.com/questions/125845/<?php the_permalink(); ?>” rel=”bookmark”><?php the_title(); ?></a></h3><p>by <?php the_author() ?></p></div> </div> </article><!– #post-## –> </div> … Read more
add_filter( ‘post_type_link’, ‘filterslash_post_type_link’, 11, 2); function filterslash_post_type_link( $post_link, $post ){ $post_link = home_url(“/$post->post_name/”); return $post_link; }
Meta key or meta value in query parameter doesn’t automatically filter the query by default. So you have to filter the query to restrict results. add_filter(‘pre_get_posts’, ‘restrict_events_by_meta’); function restrict_events_by_meta($q){ if( $q->is_main_query() && is_admin() && ‘event’ == $q->get(‘post_type’) && isset( $_GET[‘meta_key’]) && isset( $_GET[‘meta_value’]) ){ $q->set(‘meta_key’, $_GET[‘meta_key’] ); $q->set(‘meta_value’, $_GET[‘meta_value’] ); $q->set(‘orderby’, ‘meta_key’ ); } }
category_name not working in WP_Query
Add auto increment value to custom meta
It should be “categories/category_slug” not “work/category_slug” for the category archieve page
Displaying wp post categories into my custom metabox