WordPress custom post type post and category links 404
Flush your permalinks whenever you add/remove/modify a taxonomy or post type. You can do this in the backend by simply going to the permalinks page and resaving
Flush your permalinks whenever you add/remove/modify a taxonomy or post type. You can do this in the backend by simply going to the permalinks page and resaving
You need to put this inside the loop running on the portfolio page. echo get_post_meta( get_the_ID(), ‘port_excerpt’, true );
used post_type to differentiate the specific Job Manager posts and search those
Store your new WP_Query() in a variable Globalize $wp_query Move the $wp_query swap-hack to after your new WP_Query() generation Pass the variable to $wp_query, not the new WP_Query() call itself. e.g. <?php // Custom query args $press_query_args = array( ‘post_type’ => ‘press’, ‘orderby’ => ‘post_date’, //’showposts’ => ’10’, ‘posts_per_page’ => $paged, ); // Custom query … Read more
No need to be that complex, you can use the has_post_thumbnail function <?php if(has_post_thumbnail()): ?> <a href=”https://wordpress.stackexchange.com/questions/35217/<?php the_permalink(); ?>”><img src=”<?php bloginfo(url); ?><?php echo get_post_meta($post->ID, ‘featured-image-large’, true); ?>” title=”<?php echo get_post_meta($post->ID, ‘featured-image-title’, true); ?>” /></a> <?php endif; ?> et voila! =)
WP doesn’t have a real Cron Job System/APi, but it got the Schedule API, as you can see here. Other related functions can be found here in codex filed under “See Also“. That’s the closest you will get with WP.
You could order your custom post type with a custom field such as ‘order’ that your client could change for each post : $teamFeed = new WP_Query( array( ‘meta_key’ => ‘order’, ‘orderby’ => ‘meta_value’ ) ) Theres also a plugin to order custom post types with drag and drop functionality, but I never tried it … Read more
I ended up solving this by doing essentially one thing in a couple places. WordPress doesn’t let you specify a particular type for your meta data and stores everything as strings. As such, I added an extra meta data field that I used as the actual timestamp (using strtotime to convert it to a unix … Read more
$tax_slug = ‘departments’; $tax_term = ‘first-department’; // get taxonomy by slug and term $tax_args = array( $tax_slug => $tax_term ); // merge your args, with the tax args $args = array_merge( $args, $tax_args ); // Get term object $term_title = get_term_by( $tax_term, ”, $tax_slug ); // Display Title/Headline echo “<h2>{$term_title->name}</h2>”;
The easiest way you can remember which taxonomy the user arrived through to a certain post is by storing it in a cookie. This is essentially what the Smarter Navigation plugin does, except it can handle all archives, not just taxonomy archives.