It looks like you’re defining distance()
in a template file. As @wongjin pointed out in the comments, a template file may be included multiple times, and so on the second inclusion PHP will try to redefine distance()
, resulting in a fatal error.
Try moving the function distance(){ ... }
code to a separate file that is then loaded by the template file (using, eg, require
or something similar).
Related Posts:
- Matching Chapters to a Custom posts [closed]
- ACF: post query, hide duplicate values [closed]
- Redirect to another page using contact form 7? [closed]
- Using ACF default value to autoincrement a number field
- How do we update a custom file upload field with the Advanced Custom Field plugin?
- Preview with Custom Post Type Not Working
- How to create repeater field manually, without plugin (ACF Pro)?
- Setting Author on CPT
- Wrong block appender button showing
- Query Custom Post Types on Available Dates
- Should i delete the posts created by a plugin on uninstall?
- Allow users mark posts as “complete”?
- Gutenberg: How to refresh ServerSideRender with useSelect and AsyncModeProvider true?
- WP_Query ordering numbers as letters
- Getting RGBA colour from gutenberg colourpicker
- “add_post_type_support” with Custom Post Type & ACF
- Is there a way to order posts and custom post types as one group?
- Get post by ASC from custome field DATE picker
- RW Meta Box ,Problem setting post title
- How does WP handle multiple matching rewrite rules?
- how do i remove posts from a WP_Query so the pagination is right?
- Saving Custom Post types and fields to a custom table
- dynamically generating plugin syntax
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- Building a store locator with google maps
- Duplicate posts when posting nulls in records in phpMyAdmin [closed]
- How to use get_theme_mod in gutenberg editor wordpress?
- How to make wp_enqueue_style and wp_enqueue_script work only on custom post type
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- Accessing post’s meta data based on user’s click of a post
- Plugin echos text from shortcode function in gutenberg page editor
- Getting value from Advanced Custom Fields [closed]
- How do I prevent the link from using url of the image in Block Editor?
- How can you include a theme template file from within a plugin (i.e. WooCommerce’s Shop page)?
- Inserting HTML tag with ACF into shortcode
- Advanced Custom Fields plugin – get text from editor field and save it in a variable
- How to create user groups and allow custom posts and plugin modify/access to specific group?
- Correct way to make meta box with more than one meta field secure
- I want to extend the current themes’ single.php to display the meta fields of my CPT
- Plugin custom post type – Internal server Error
- Exclude post by custom meta with pre_get_posts
- How can I create a custom shortcode that will return a custom post type by ID?
- Is it possible to create Custom Post plug-in?
- get_post_type() and WP_QUERY issue
- Pull out Advanced Custom Fields in Related post plugin
- get_post_type on post.php
- List taxonomy terms for post as checkboxes
- All of my custom posttypes are 404’ing
- more types plugin – display all post of post type on page
- When using Simple Fields plugin, how do I pull the information out of the database to display on a page?
- How to add Internationalization in WordPress using Javascript/React?
- how to disable blockrenderAppender inside all Innerblocks?
- Cannot find a list of data selectors for Gutenberg editor
- WordPress Gutenberg react make import of __experimentalUseInnerBlocksProps which is no more experimetal
- How to make a proper custom post type link
- Using a post-signup hook to get user details
- Advanced Custom Fields displaying on tag pages
- Custom post type – no layout section of Document tab, and no author choice
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- Add button gutenberg help
- className not populating in custom block
- ‘No Results Found’ on single post for custom post type
- Keep a post copy when this one is updated – issue
- Making a Template for a CPT created by a plugin
- how to add a button next to the wordpress view button?
- Gutenberg block can’t save richtext
- Custom Fields with Pods not being translated
- auto populate list of questions if user select a category xyz
- is there a way to link one of the field in ACF field group, to a field in a media attachment page? [closed]
- Use gutenberg block editor on plugin page (outside of a post)
- Using SVN to upload plugin created with gutenberg blocks
- I am not receiving className in a ServerSideRender component
- Will Gutenberg Have a Negative Impact on Page Speed?
- How to remove the inline styles from the content of a WYSIWYG editor field at the time of saving the post?
- add custom filters to the event calendar plugin programatically to frontend [closed]
- Can you use another Profile Builder shortcodes through advanced custom fields
- Mq translate plugin custom post type issue
- dirname( __FILE__) returning wrong directory inside plugin
- “Custom Post Type Permalinks” plugin URL strcuture
- Unable to delete custom post types, confusion around capabilities
- Adding CSS to custom post type admin page causes error
- Gutenberg: Block SelectControl saves attributes but after a reload of Gutenberg it loads its defaults. Why?
- Paid Membership Pro with ACF [closed]
- Would Gutenberg be considered a PlugIn?
- Can’t get Gutenberg InspectorControls to work
- ACF only showing up in Homepage but doesn’t appears in all pages
- What is the best way for showing a grid of customer logos?
- Custom Post Type Fields
- How to delete all trashed item in one-go
- Advanced Custom Fields – Disable Users to Edit Custom Fields
- How can I use a file in my plugin as a replacement for single.php on custom-post-type query?
- Custom setup of wordpress comments that are displayed
- publish_post action doesn’t work
- Disable Individual Plugins (specifically in Custom Post Types) on a per-post basis?
- WordPress custom taxonomy not showing
- How to add custom table style for table block in gutenberg editor
- Gutenberg Block Style CSS Class Is Not Applying on Backend
- URLs Added to ACF Repeater Field are not working
- custom post type don’t appear in the home page
- Advanced Custom Fields – Get value in other plugin file [closed]