WordPress not auto saving custom posts
WordPress not auto saving custom posts
WordPress not auto saving custom posts
If the posts with tables are part of “normal” blogging flow and appear with rest of the posts, there is probably little reason to separate them out into CPT. Shortcode bit is irrelevant, you’ll have to deal with tables regardless of native or custom post type. The use cases for CPTs loosely start for content … Read more
change precedence of permalink for post_types?
Asking this question gave me an idea. make the single-[posttype].php and inside it just put <?php wp_redirect(get_page_uri(get_page_by_path(‘your-page-slug’)); ?> also works with get_page_by_title() This will direct the preview post and view post link on the admin create post page to the page you want.
Managed to do it by putting this into the loop: <?php if (has_term( $_GET[“lang”], ‘sprache’ )) { ?> I was then able to creat links like …/autor/steve-perry/?lang=englisch to filter the search results the way I wanted to.
You have double posted this question, and in your comment in the previous question you said that you don’t know if you are using build-in categories or custom taxonomies. Essentially, built-in categories and custom taxonomies are both Taxonomies, and the “categories” that you create in the back end are in actual fact just terms of … Read more
WordPress queries (using WP_Query or get_posts() either) support post__in argument to retrieve specific set of posts by IDs. So you would need to produce such list from your custom storage and then use in a query.
There is no concept natively of archive for intersection of specific custom post type with specific taxonomy. There are multiple approaches here, but all will take some tinkering: you can adjust category term archives to include your CPT (via pre_get_posts hook) you can extend custom post type archives with endpoint to filter them by category … Read more
Should be easy enough. First, get the City. <?php $city = get_field(‘city’); ?> Then in your WP_Query, insert the taxonomy parameter: <?php $loop = new WP_Query( array( ‘post_type’ => ‘member’, ‘posts_per_page’ => -1, ‘location’ => $city ) ); ?> Et Vilola: you only get the Members that have the taxonomy $city.
Use a new query outside the loop like this one $query = new WP_Query( ‘category_name=ben affleck;post_type=post’ ); if ( $query->have_posts() ) : while $query->have_posts() : $query->the_post(); // Loop output goes here endwhile; endif;