Conditional css for custom post type

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

Using AJAX and PHP to load next post object

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.

Custom Template for wordpress cpt plugin

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

Are post, page and category IDs unique to each other?

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