Custom WP_Query not working correctly
Use wp_reset_query() to restore the original query. This also calls wp_reset_postdata, so you can just replace that.
Use wp_reset_query() to restore the original query. This also calls wp_reset_postdata, so you can just replace that.
Two things are important here, your taxonomy is portfoliosets, which mean this is not a built-in category. videos and magazines are terms of your taxonomy. From what I can make from your question, you need to show different header image for different single post page view depending on the term a post belongs to. Based … Read more
The URL you are trying to pass to cannot be used (wp-content/themes/stargazer/populate.php) As @Milo pointed out, please check the AJAX Codex, and it will explain the use of ‘ajaxurl’, which is a protected variable. In short, all AJAX requests must be passed through ‘admin-ajax.php’ whether it is for the frontend or backend.
As I already mentioned in my comments, you must use pre_get_posts to add custom post types to archive pages. One thing you must keep in mind here though, you have two archive pages here, archive.php and archive-event.php, so is_archive() is going to return true on both, which will alter both pages. You will need to … Read more
If you’re on a page by default The Loop will only run once so why not wrap your title and content in a container where you can have post_class() available? Start your loop at the top and end it before you get to your footer (or where ever you need to end it). If you … Read more
The requires are just echoing the content, you need to put ob_start(); before the if ($query->have_posts()) :, and return ob_get_clean(); after the endif;.
To get post meta fields, you can use get_post_meta() function, but obviously not get_user_meta(), the name of the functions are self-explanatory. The first parameter of get_post_meta() function is the post ID; here you define which post you want to get postmeta from. So, you need to get frist the post ID of the post you … Read more
The file testimonial_archive.php is not a valid WP template if you don’t define a custom way to use that file. The expected name is cpt-archive.php, in your case astestimonial-archive.php. Also, instead of using file_exists, you should use locate_template() to take adventage of template hierarchy and compatibility with child and parent themes. add_filter(‘template_include’, ‘testimonial_archive’); function testimonial_archive( … Read more
You can do this using a plugin. A couple of options are RSS Image Feed WP RSS Images
There are multiple types of data objects: posts: pages, regular posts, nav menu items, attachments and custom post types terms for different taxonomies: categories, tags, nav menus comments links options various meta data Term ids are for a different type of objects than post ids. Both are primary keys for different tables. From Potential roadmap … Read more