WordPress.org

Support

Support » Plugins and Hacks » Basic Google Maps Placemarks » [Resolved] Breaks all post types

[Resolved] Breaks all post types

  • Hey Ian,

    I get

    Server error
    The website encountered an error while retrieving http://kadunud.com/hange/wp-admin/edit.php?post_type=bgmp. It may be down for maintenance or configured incorrectly.
    Here are some suggestions:
    Reload this webpage later.

    after installing via shortcode php do + function bgmpShortcodeCalled()
    {
    global $post;

    if( is_front_page() || is_home_page() )
    add_filter( ‘bgmp_map-shortcode-called’, ‘__return_true’ );
    }
    add_action( ‘wp’, ‘bgmpShortcodeCalled’ );

    Everything works nicely except for the fact I cannot access any post types from WP left side menu. Do you know anything of this?

    The site is http://kadunud.com/hange/

    http://wordpress.org/extend/plugins/basic-google-maps-placemarks/

Viewing 3 replies - 1 through 3 (of 3 total)
  • EDIT: `<blockquote>bgmpShortcodeCalled()
    {
    global $post;

    if( is_front_page() || is_home_page() )
    add_filter( ‘bgmp_map-shortcode-called’, ‘__return_true’ );
    }
    add_action( ‘wp’, ‘bgmpShortcodeCalled’ );`

    this broke my post types.

    I only added this

    add_filter( ‘bgmp_map-shortcode-called’, ‘__return_true’ );

    and it worked nicely.

    Resolved. Thanks for awesome plugin!

    Plugin Author Ian Dunn

    @iandunn

    Thanks. I think the problem was that those functions don’t exist on the back-end. This updated version should work:

    function bgmpShortcodeCalled()
    {
    	global $post;
    
    	if( ( function_exists( 'is_front_page') && is_front_page() ) || ( function_exists( 'is_home_page' ) && is_home_page() ) )
    		add_filter( 'bgmp_map-shortcode-called', '__return_true' );
    }
    add_action( 'wp', 'bgmpShortcodeCalled' );

    I’ll update that for the next release.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Breaks all post types’ is closed to new replies.
Skip to toolbar