New template, where to place CSS?

Include CSS and JavaScipt in the functions.php. Create an empty PHP file, call it header.php, and yes wp_head() goes just before </head> not before <body> tag. <!DOCTYPE html> <html> <head> <title>Website</title> <link href=”https://wordpress.stackexchange.com/questions/222452/style.css” rel=”stylesheet” type=”text/css” /> <?php wp_head(); ?> </head> Create an empty PHP file, call it footer.php and place your footer there: <footer> <!– … Read more

How can I force custom post type to use a specific template?

If your newsletters are a custom post type you can create a template dedicated for it using the template hierarchy. Template for a single page would be.. single-{custom-post-type-name}.php Template for an archive page would be.. archive-{custom-post-type-name}.php These templates get automatically selected you don’t need to add them to a page template attribute in the editor.

Strange Behaviour with is_home()

From look at the code the following logic happens in your case: query is for one post type that has archive is_post_type_archive gets set to true is_archive gets set to true is_home gets set to false since it is seen as archive I am not sure about all implications without extensive testing, but probably approaches … Read more

How to display only an excerpt of the content with custom post types?

You only need two small changes (1st and 3rd lines), though I also took the liberty of tweaking the classes on the div to what seemed more appropriate: <h1 class=”title”><a href=”https://wordpress.stackexchange.com/questions/67750/<?php the_permalink(); ?>”><?php the_title(); ?></a></h1> <div class=”excerpt event”> <?php the_excerpt(); ?> <?php wp_link_pages(array(‘before’ => ‘<div class=”page-link”>’.__(‘Pages’, ‘cpotheme’).’:’, ‘after’ => ‘</div>’)); ?> </div>

Template for slug

Try creating a Page with the users slug, then using a custom Page Template to provide the functionality you want to display all the users.

how to create template path for external (include) .js file

Use wp_enqueue_script(), hooked in via an appropriate action hook callback. wp_enqueue_script( // Script handle ‘someScript’, // URL get_template_directory_uri() . ‘/js/someScript.js’, // Dependencies array( ‘jquery’ ), // Version ‘2.4’, // Output in footer? false ); For example: function wpse72720_enqueue_scripts() { if ( ! is_admin() ) { wp_enqueue_script( ‘mathUtils’, get_template_directory_uri() . ‘/js/mathUtils.js’, array(), ”, false ); wp_enqueue_script( … Read more