Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • The error is possibly due to the lack of the slugdiv meta box on either single Post or Page admin views. This might be unset as the result of a plugin like Advanced Custom Fields, or it may be due to some other custom code:

    remove_meta_box('slugdiv', 'page' , 'normal');

    I frequently remove it, to make the admin pages cleaner for clients. If you are getting a JS error traced back to wp-seo-post-scrapper.min.js then this is likely your problem. The script relies on an input field in the slugdiv container to write to it’s own hidden fields.

    Thread Starter woprsk

    (@woprsk)

    It’s still unclear to me which plugin may have caused it, but it was definitely not related to a multilanguage plugin.

    Thread Starter woprsk

    (@woprsk)

    After a clean install of wordpress and a fresh DB, the issue is gone. Seems a plugin that was previously installed was probably the culprit.

    Thread Starter woprsk

    (@woprsk)

    This was exactly what I needed.

    Thanks!

    Thread Starter woprsk

    (@woprsk)

    So here’s an update:

    The attachment’s parent doesn’t match my post so it doesn’t find any attachments. The post ID is 341, but the attachments post parent is 319.

    This is a custom post type if that matters.

    add_filter( 'the_content', 'my_the_content_filter');
    function my_the_content_filter( $content ) {
    	global $post;
    
    	if ( is_singular('releases') || is_archive('releases') ) {
    
    		$attachments = get_posts( array(
    			'post_type' => 'attachment',
    			'posts_per_page' => 0,
    			'post_mime_type' => 'audio/mpeg',
    			'post_parent' => $post->post_parent
    		) );
    
    		if ( $attachments ) {
    			$content .= '<ul class="post-attachments">';
    			foreach ( $attachments as $attachment ) {
    				$class = "post-attachment mime-" . sanitize_title( $attachment->post_mime_type );
    				$title = wp_get_attachment_link( $attachment->ID, false );
    				$content .= '<li class="' . $class . '">' . $title . '';
    			}
    
    			$content .= '';
    		}
    	}
    
    	return $content;
    }

    Thread Starter woprsk

    (@woprsk)

    There is only one plugin installed, and it’s not active. The theme in use is Twenty Twelve. I’ve completely removed all plugins and the problem still persists. Is there any way to look at the database rewrite rules and compare them to the default?

Viewing 6 replies - 1 through 6 (of 6 total)