Tag Info

Hot answers tagged

3

Can do this without any plugin, you need only the Google Maps Api. Please note that if you plan to have 20 markers or more on a single page, you have to geolocate posts using coordinates and not addresses. To save coordinates from an address you can manually use a service (something like this) call google maps geocoding from WP admin when you create or ...


2

Depends on what you mean by "redirect". If you want to 404 them, this will do the job: add_filter('wp_die_handler','custom_404_die_handler'); function custom_404_die_handler() { global $wp; $wp->handle_404(); load_template(get_404_template()); die(); } If you actually want to redirect them somewhere, then you could do something like ...


1

Polylang seems to be a direct alternative to WPML. From the plugin description: Polylang allows you to create a bilingual or multilingual WordPress site. You write posts, pages and create categories and post tags as usual, and then define the language for each of them. The translation of a post, whether it is in the default language or not, is ...


1

These are actually two questions. The second question – how to add categories to attachments – is already answered. How to restrict uploading attachment to a specific role? The capability to do that is named upload_files in WordPress. Some roles have this capability by default: authors, editors, administrators. I would restrict it to editors and ...


1

A hook can only be implemented via actual function call. It is not possible without adding that call to theme template directly or via other method (calling it inside another, already available, hook for example). There is Theme Hook Alliance initiative to promote more standardized hooks in themes and increase flexibility, but adoption have been low so far ...


1

I am sure that you could do this with WordPress, but this is far from what WordPress was built to do. Your description makes it sound like you would not be using most of WordPress. I don't see any mention of posts, or any mention of public content at all actually. You wouldn't need posts, pages, feeds, taxonomies, most everything. I don't think that the ...


1

You would think that it would be as simple as adding add_post_type_support( 'cptslug', 'page-attributes' ); to your code, but it isn't. If you check the source you will see that the template dropdown is restricted to the page post type only. There is also a note in the Codex and a reference to a closed Trac ticket on the topic. You can add that box to your ...


1

If you're adding a custom query within the template to load posts, the post type of that page doesn't have to be your custom post type. You can create a plain vanilla page, create a template for that via page-your_page_slug.php, or via a custom template assigned in the templates dropdown, then query for whatever post type you want via WP_Query. EDIT - ...



Only top voted, non community-wiki answers of a minimum length are eligible