Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • I haven’t confirmed this – but my thought is that if the site URL is defined in the database as ‘http’ and then instead of using WordPress Settings > General to set as ‘http’, if it’s overridden in wp-config.php and assigned as ‘https’ – I wonder if then the AAM_MEDIA already has been set to ‘http’ because that’s what’s in the database had when it was defined.

    I also see the same http being loaded for the svg logo and that also sits in the media directory. so it seems to be related to the AAM_MEDIA definition.

    @vasyltech any thoughts?

    Hi there,

    Was there any solution found to this? I have been having the exact same issue on a site. My site shows this mixed content message and refuses to load the vendor.css [advanced-access-manager/media/css/vendor.min.css] and aam.css [advanced-access-manager/media/css/aam.css] – all the rest load fine.

    Is there any chance these two are hardcoded in the plugin?

    Forum: Fixing WordPress
    In reply to: Best Solution
    Thread Starter michaelpiercy

    (@michaelpiercy)

    I’ve been thinking that a possible solution would be to have the one wordpress build, then code in factors into the theme to check the base url. If it’s .co.uk then display variable 1 from database; if it’s .ie then display variable 2.

    But is it possible to have two top level domains pointing to the one website while keeping their domain intact. ie not just a basic url forward.

    Thread Starter michaelpiercy

    (@michaelpiercy)

    Oh, I got it. Actually the code you gave did work, Ashley. I was just placing the wrong array in to the list of post types.

    For anyone else that has trouble with this, be sure to put in the exact same string that was passed as a parameter to your register_post_type function.

    Thanks again Ashley!

    Michael

    Thread Starter michaelpiercy

    (@michaelpiercy)

    Thanks Ashley,

    I took a look and tried out the code in the link you gave but to no avail. I don’t mind changing my strategy here if there’s another way to do this? I just don’t want to have to use a plugin for it…

    Below is what my functions.php looks like now that I added products post type… Any more ideas? It’s really bugging me!

    <?php
    
    // Add Product Post Type
    
    add_action( 'init', 'create_post_type' );
    function create_post_type() {
        $labels = array(
            'name' => __( 'Products' ),
            'singular_name' => __( 'Product' ),
          );
    
        register_post_type( 'acme_product',
            array(
                'labels' => $labels,
                'public' => true,
                'has_archive' => true,
                'taxonomies' => array('category'),
                )
            );
    }
    
    function namespace_add_custom_types( $query ) {
      if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
        $query->set( 'post_type', array(
         'post', 'products'
    		));
    	  return $query;
    	}
    }
    add_filter( 'pre_get_posts', 'namespace_add_custom_types' );
    
    ?>
Viewing 5 replies - 1 through 5 (of 5 total)