Forum Replies Created

Viewing 15 replies - 46 through 60 (of 177 total)
  • Thread Starter Jon

    (@freshyjon)

    This is another response, after they looked into it more:

    We have investigated the code of the plugin “PB SEO Friendly Images”. The method “optimize_html” in the class “pbsfi_frontend”, which is attached to the hook “the_content” with the priority 9999, changes the page’s content and breaks our functionality.
    This issue can’t be solved from our side. Please ask the “PB SEO Friendly Images” support team for assistance.

    As a temporary solution I recommend you to disable HTML optimization for these pages:

    • Group
    • Members Directory
    • Profile

    The plugin “PB SEO Friendly Images” has the hook ‘is_optimization_allowed’ that allows you to disable HTML optimization for certain pages. See code example below. Add this code snippet to the end of the functions.php file in the active theme directory.

    The code snippet:

    /**
     * Check if content could be optimized
     *
     * @see    /wp-content/plugins/pb-seo-friendly-images/inc/pbsfi_optimizer.php
     *
     * @param  boolean $is_optimization_allowed
     * @param  attay   $data
     * @return boolean
     */
    function my_is_optimization_allowed( $is_optimization_allowed, $data ) {
    
    	// Disable content optimization for the Members page
    	if ( um_is_core_page( 'members' ) ) {
    		$is_optimization_allowed = false;
    	}
    
    	// Disable content optimization for the Profile page
    	if ( um_is_core_page( 'user' ) ) {
    		$is_optimization_allowed = false;
    	}
    
    	// Disable content optimization for the Group page
    	if ( get_post_type() === 'um_groups' ) {
    		$is_optimization_allowed = false;
    	}
    
    	return $is_optimization_allowed;
    }
    if ( defined( 'ultimatemember_version' ) ) {
    	add_filter( 'is_optimization_allowed', 'my_is_optimization_allowed', 20, 2 );
    }
    • This reply was modified 5 years ago by Jon.
    Jon

    (@freshyjon)

    But it would show for other admin users who log in, right?

    Jon

    (@freshyjon)

    This is despicable and the banner should be removed immediately, or at least provide an option to disable. Don’t try advertising your own agency, when other agencies rely on your plugin.

    https://gyazo.com/4741f691b82cece767a88d8b6a2bf4b3

    Thread Starter Jon

    (@freshyjon)

    This is what Ultimate Member mentioned:

    If the “PB SEO Friendly Images” plugin adds React or Angular code to the pages where our templates are used it may cause an error. The “Ultimate Member” plugin and some of its extensions use default WordPress templates. The React and Angular frameworks must not be used with the WordPress templates because they use similar syntax. Please read the article “Javascript Reference/wp.template” for details.

    • This reply was modified 5 years ago by Jon.
    Thread Starter Jon

    (@freshyjon)

    Understood, but it would be ideal if this wouldn’t be necessary; as it only happened once we updated your plugin. It would be preferred if we didn’t have to manually exclude certain pages after updating.

    Thread Starter Jon

    (@freshyjon)

    Thanks! That is my planned workaround for now. I still do prefer taxonomy be separate, instead of nested terms, but I do understand that’s the way to do it if I want the proper permalink I mentioned.

    Thread Starter Jon

    (@freshyjon)

    I respectfully disagree. I think it makes sense. Especially if you had multiple taxonomy within a custom post type.

    /writing/books/thriller/the-institute

    /writing/books/biography/steve-jobs

    /writing/magazines/automotive/car-and-driver

    /writing/magazines/gaming/electronic-gaming-monthly

    Thread Starter Jon

    (@freshyjon)

    I like the Custom Post Type > Single Term (or Term tree) > Post option, but would like to also add the Taxonomy Name to the permalink too (as mentioned in my original post)

    Thread Starter Jon

    (@freshyjon)

    So, /cpt_slug/post_name is the best it can do? There is no way to pull in the taxonomy name or the term name? If that’s the case, I’m not sure there’s a benefit to using this for CPT then.

    Thread Starter Jon

    (@freshyjon)

    This is what I ended up doing:

    /* add custom content related to Access Category Password plugin */
    
    // add content below existing content
    add_filter( 'the_content', 'fs_add_form_below_password_plugin' );
    function fs_add_form_below_password_plugin( $content ) {
    	
    	// set the variable of new_content to be regular content (in case our criteria isn't met, it will output regular content still)
    	$new_content = $content;
    
    	// get the options of the plugin settings
    	$acpwd_options = get_option('acpwd_settings_options');
    	
    	// check for the categories that were set to be impacted
    	$impacted_categories = (isset($acpwd_options['impacted_categories'])) ? $acpwd_options['impacted_categories'] : array();
    	
    	// if we are viewing a post within one of those categories
    	if ( in_category($impacted_categories) ) {
    		
    		// then add new content (Gravity Form shortcode with div wrapper) below the existing content
    		$new_content = '<div id="fs-password-form">[gravityform id="3" title="false" description="false" ajax="true"]</div>';
    		
    		// the content to output is the regular content plus the new_content
    		$content .= $new_content;
    		
    		// output all the content now
    		return $content;
    		
    	}
    	
    	// if the logic above wasn't met, then we still need to output the content
    	return $content;
    }
    Thread Starter Jon

    (@freshyjon)

    Yes, I thought about inserting it with jQuery, but we are trying to add a Gravity Form. To do that, we need to be able to inject it via a shortcode. Unfortunately (as far as I know), jQuery doesn’t render PHP shortcodes when injecting it. It’d need to be done via some PHP method for the shortcode to be rendered properly.

    Jon

    (@freshyjon)

    Guess this plugin doesn’t have any Support? ??

    Jon

    (@freshyjon)

    Same. Ideally a plugin update wouldn’t be available before a changelog…

    Thread Starter Jon

    (@freshyjon)

    Never mind. I figured it out. Ultimate Member > Member Directories > choose the directory > Search Options > Expand the filter bar by default

    Thread Starter Jon

    (@freshyjon)

    I’m not adding Google Analytics “manually”, but am actually adding it via All In One SEO plugin.

    Why the Google Tag Manager code is on there, I’m not sure. It was likely requested by the client for some other purpose other than Google Analytics.

    I’m not sure it’s the best idea for your plugin to not work, if Google Tag Manager is added… since it’s possible it was added for other reasons beyond Google Analytics tracking. Especially when I’m referencing the ideal UA ID in your plugin.

    Edit: went back to using the trusty (albeit outdated) Gravitate plugin.

    • This reply was modified 5 years, 3 months ago by Jon.
Viewing 15 replies - 46 through 60 (of 177 total)