How to create page that lists tags by initial letter?

First Question’s Answer: For filtering based on your terms first letter you need to filter the query, which you can do with the terms_clauses hook. By putting the below code block in your theme’s functions.php you can do that- function the_dramatist_filter_term_clauses( $clauses ) { remove_filter(‘term_clauses’,’the_dramatist_filter_term_clauses’); $pattern = ‘|(name LIKE )\’%(.+%)\’|’; $clauses[‘where’] = preg_replace($pattern,’$1 \’$2\”,$clauses[‘where’]); return … Read more

Multiple calling javascript from shortcode in one page

A script should be enqueued and localized only one time per page; so, what you describe is the correct behaviour. I think you are confusing localizing a script with printing inline JavaScript. Also, enqueuing and localizing should be done in wp_enqueue_scripts action. You need to think in a different approach. For example (just a example), … Read more

Permalink base only for posts

To get your desired structure: Go to Settings > Permalinks in Admin. Under Common Settings, click Custom Structure and enter /blog/%postname%/ Click Save Changes button. This sets the permalink structure for posts. Pages already appear at at the root of your install, so no modification is needed for that.

Adding a category view to a page

Sorted it… get_header(); ?> <div id=”content” class=”site-content inner”> <div id=”primary” class=”content-area”> <main id=”main” class=”site-main” role=”main”> <p class=”sixhundred”>Intro.</p> <!– START OF THE FLEX CONTAINER, THE UNORDERED LIST –> <ul class=”grid-wrap”> <!– WP LOOP STARTS HERE –> <?php if ( have_posts() ) : query_posts( “category_name=basic-skills” ); while ( have_posts() ) : the_post(); ?> <!– LIST ITEM FOR … Read more

Need help to structure our a complex hierarchy

More than categories, you have custom taxonomy, it’s easy to add custom taxonomy to post edit screen and retrieve these custom taxomnomies according to any logic with a custom WP_Query. An example: function continent_init() { // create a new taxonomy register_taxonomy( ‘continent’, ‘post’, array( ‘label’ => __( ‘Continent’ ), ‘rewrite’ => array( ‘slug’ => ‘continent’ … Read more

Posts are not showing up on next page.

For one thing, that plugin hasn’t been updated in 8 years (https://wordpress.org/plugins-wp/wp-page-numbers/). George W. Bush was still president when that code was written. You should never use plugins that are not actively maintained because they most likely won’t work. Try wp_page-navi (https://wordpress.org/plugins/wp-pagenavi/). It’s actively developed/maintained.

How do I set content in my pages so that it remains permanent while blog posts are added below?

If you want to show that static content in your post then you can find post.php template in your theme and find function “the_content();” just before this function make a div for your static content and add our static content there. Similarly if you want to show that content in page then find page.php template … Read more