Archive Page for Multiple Custom Post Types

Let’s say you have custom post types cpt_a, cpt_b, cpt_c. You could make an archive page for cpt_a: archive-cpt_a.php. Then after the main loop, you could make a second loop for cpt_b like this: $cpt_b = new WP_Query( array( ‘post_type’ => ‘cpt_b’, ‘posts_per_page’ => -1 ) ); while ( $cpt_b->have_posts() ) : $cpt_b->the_post(); the_title(); endwhile; … Read more

Custom Post Type setup

You can set any arbitrary path in the rewrite slug and has_archive arguments: $args = array( ‘rewrite’ => array(‘slug’ => ‘people/researchers’), ‘has_archive’ => ‘people/researchers’, // other args… ); EDIT Your post type slug is researchers, so WordPress will be looking for the file archive-researchers.php by default. If you want to force a different template, you … Read more

singular posts using archive styling

if you are not aware of WordPress template structure. https://developer.wordpress.org/themes/template-files-section/taxonomy-templates/ https://developer.wordpress.org/themes/basics/template-hierarchy/ WordPress follow a hierarchy for post/page templates archive.php for your archive pages of post and category. single.php for your every WordPress single post. you can adjust your single.php code to make single page HTML different then archive page. In your case to separate styling … Read more

How to store archived copies of a WordPress site

One option: revisions. If you save a large number of revisions for your pages, you can then browse through the revision history and “Preview” what a particular page looked like at a particular point in time. However, this requires whoever is viewing the past view to be logged in, since Previews are not public. Another … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)