Integrate OpenStreetMap on WordPress

Ok so I finally managed to get it working, my map now displays, thanks to you people. What I did is : I changed the path to the absolute path of the scripts. Indeed, using a relative URL was a bad idea. I have changed my script, which now looks like that : document.addEventListener(“DOMContentLoaded”, function() … Read more

Get Posts Under Custom Taxonomy

Your tax query is incorrect, field should be the field you want to query on: term_id, name, or slug – $posts_array = get_posts( array( ‘posts_per_page’ => -1, ‘post_type’ => ‘fabric_building’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘fabric_building_types’, ‘field’ => ‘term_id’, ‘terms’ => $cat->term_id, ) ) ) );

Show only one page link in content pagination

To show prev/next links rather than numbered pagination you need to set the next_or_number argument to next. Then if you want to remove the previous links, you can filter the HTML for the links with the wp_link_pages filter. But, you can be craftier and filter on the wp_link_pages_link hook. Although it is used in a … Read more

Post page to display specific category

At be top of your template code: <?php /** * The template used for Home page ?> You never closed the comment with a */ which is commenting out the rest of your code. It should look like this: <?php /** * The template used for Home page */ ?>

301 (static page instead latest posts)

1. Plugin: Redirection This plugin allows you to manage 301 redirections. I played around with the settings and they allows regular expressions which could do the following: http://some.site/page/2/ to http://some.site/blog/page/2/ http://some.site/page/3/ to http://some.site/blog/page/3/ etc. They provide documentation on how to set it up which can be found here. This is what I’ve done when creating … Read more

Post Loop Missing Most Recent Post

If you don’t specify posts_per_page in your get_posts you will get the default amount of posts, which is five. Normally the offset is 0 and order is by date, so this doesn’t explain why the most recent post would be missing.