Forum Replies Created

Viewing 15 replies - 1 through 15 (of 29 total)
  • This has happened to me as well on two different websites. Added a redirect and checked the box to delete those links. Instead all links in the 404 listing were deleted. Using the most recent version of the plugin 3.6.1

    The static page pagination did not work before update either.

    As long as the individual Posts URL are working we are OK. Giving the primary domain credit for the static pages (list of Posts) is fine at this point.

    Thank you.

    I have updated the plugin.

    Followed idarek’s suggestion to turn Yoast Sitemap off and on again.

    All good. Posts are now listed in the sitemap.

    Thank you!

    I have updated the Plugin

    Primary site: http://shspestcontrol.com/
    Click on Menu Item “Pest Facts” to go to http://www.pestcontrolri.com/
    Scroll down bottom of page to click on “Next Page”
    Goes to http://shspestcontrol.com/pest-facts/page/2/

    This is not a major problem as the individual Posts use the correct URL and that was the primary goal
    http://www.pestcontrolri.com/common-pests-in-february/
    and going to Next and Prev continue to use http://www.pestcontrolri.com/post-name

    Thank you

    Thank you

    Fixed the problem with CORS
    http://enable-cors.org/server_apache.html

    Thanks for all the replies and info…

    I added to .htaccess file in root directory

    Header set Access-Control-Allow-Origin “http://www.pestcontrolri.com”

    and the images are now showing on pestcontrolri.com page and posts.

    Question — does this open any doors to potential hackers or malicious code..?

    Thanks

    To be sure I am understanding correctly,

    The request for the icon image file from any Page or Post that uses http://www.pestcontrolri.com/ is only using the path
    <use xlink:href=”#social-email”></use>
    It does not include the full path.

    Where as, from any Page using http://shspestcontrol.com the image file request uses the full path
    <use xlink:href=”http://shspestcontrol.com/shs/wp-content/plugins/simple-social-icons/symbol-defs.svg#social-email”></use>

    So creating a redirect from the full path (A) http://www.pestcontrolri.com/shs/wp-content/plugins/simple-social-icons/symbol-defs.svg
    to (B)
    http://shspestcontrol.com/shs/wp-content/plugins/simple-social-icons/symbol-defs.svg
    would not work, as (A) does not exist.
    Correct?

    I have sent your suggestion to the plugin developer for Domain Mapping.

    Thanks

    Thank you for your response

    For the Single Posts I added /pest-facts/ to the Permalink Custom Structure so it is now
    http://shspestcontrol.com/pest-facts/%postname%/
    Fortunately this does not add /pest-facts/ to static Page URLs

    Domain Mapping appears to be working for links to Single Posts and Categories
    http://www.pestcontrolri.com/carpenter-bees-pest-control/
    http://www.pestcontrolri.com/category/common-new-england-pests/
    http://www.pestcontrolri.com/category/shs-pest-control-services/homeowner-pest-control-plans/

    Which leaves the Pagination still reverting back to shspestcontrol.com
    http://shspestcontrol.com/pest-facts/category/common-new-england-pests/page/2/

    I look forward to hearing when you have a fix for this

    Thanks, Toni

    Also, not sure if relevant but the Navigation Menu item PEST FACTS is set to use the Posts Page: Pest Facts. Would it make a difference if it was set to a Custom Link using http://www.pestcontrolri.com ?

    The website is working now as I have replaced the plugin with hard code.
    After several attempts this worked… Hopefully not a short term fix.
    <div id=”fb-root”></div>
    <script>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = “//connect.facebook.net/en_US/all.js#xfbml=1”;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, ‘script’, ‘facebook-jssdk’));</script>

    <div class=”fb-page” data-href=”https://www.facebook.com/newportbridgefest&#8221; data-width=”300″ data-height=”1200″ data-small-header=”false” data-adapt-container-width=”true” data-hide-cover=”false” data-show-facepile=”true” data-show-posts=”true”>
    <div class=”fb-xfbml-parse-ignore”>

    Newport BridgeFest</p>

    </div>
    </div>

    Dan, thanks for pin pointing the problem. I have added plugin WP jQuery Plus and now the documents open in a new window.

    Thanks again.

    It it helps, here is the code in the child theme functions . php

    <?php
    /** WP Members Plugin part of redirect once logged in */
    add_filter( 'wpmem_login_form', 'my_login_form_filter' );
    function my_login_form_filter( $form ) {
    	global $wpmem_a;
    	if( $wpmem_a != 'pwdreset' && $wpmem_a != 'pwdchange' ) {
    		return '';
    	}
    	return $form;
    }
    
    /**
     * WP Members Plugin Block menus based on login and user role using wp_nav_menu_args
     *
     * This is close to cut-and-paste-code.  You will need to make
     * some changes to reflect the menu names and possibly role
     * capabilities. To use/test as-is, you'll need to match up
     * menu names (value of $args['menu'] with the various (3) states:
     * * logged in, editor or higher role
     * * logged in, lower than editor role
     * * logged out
     */
    add_filter( 'wp_nav_menu_args', 'wpmem_nav_menu' );
    function wpmem_nav_menu( $args )
    {
    	if( is_user_logged_in() ) {
    
    		/** the user is logged in, display menu based on role */
    
    		if( current_user_can( 'edit_posts' ) ) {
    
    			// if the user has editor role or higher
    			$args['menu'] = 'editor-menu'; // editor menu name
    
    		} else {
    
    			// user is logged in, but lower than editor role
    			$args['menu'] = 'subscriber-menu'; // loer than editor menu
    
    		}
    
    	} else {
    
    		/**
    		 * here the user is not logged in. display the
    		 * non-logged in menu
    		 */
    		$args['menu'] = 'logged-out';  // logged out menu name
    	}
    
    	return $args;
    }
    
    /**
    * WP-Members sidebar status filter example
    *
    * This is an example of the wpmem_sidebar_status
    * filter hook. The hook brings in the html $string
    * generated by the plugin and makes somes changes.
    */
    add_filter( 'wpmem_sidebar_status', 'my_sidebar_status' );
    function my_sidebar_status( $string )
    {
    /** get the user info in an object using get_currentuserinfo */
    global $current_user;
    get_currentuserinfo();
    
    /**
    * use str_replace to find the original "You are logged in as $user_login"
    * and replace it with "Welcome, Firstname Lastname" and make
    * it <b>bold</b>.&nbsp; (NOTE: we are making the assumption here
    * that first_name/last_name are being used as required
    * registration fields
    */
    $replace = '<b>Welcome, '
    . $current_user->first_name . ' '
    . $current_user->last_name . '</b>';
    $needle = 'You are logged in as ' . $current_user->user_login;
    $string = str_replace( $needle, $replace, $string );
    
    /**
    * use str_replace to find the original "click here to logout"
    * and replace it with "Not Firstname?"
    */
    $replace = 'Not ' . $current_user->first_name . '?';
    $needle = 'click here to logout';
    $string = str_replace( $needle, $replace, $string );
    
    /**
    * find the user's avatar, size it at 32px
    * attach it at the front of the html $string
    */
    $string = '<div style="padding-top:4px;padding-right:4px;float:left;">'
    . get_avatar( $current_user->ID, '32' )
    . '</div>'
    . $string;
    
    /** return the filtered html */
    return $string;
    }
    
    add_action( 'wp_head', 'check_page' );
    function check_page()
    {
    	/**
    	 * If the page is the landing page AND the user is
    	 * logged in, then use wp_redirect to send the user
    	 * to some URL (presumeably the main site).
     	 */
    	if( is_page( 'login' ) && is_user_logged_in() ) {
    		wp_redirect( 'http://newportbayclub.com/login/nbc-documents/' );
    		exit();
    	}
    
    	return;
    }
    
    /**
     * Add a custom column to the Users > All Users table
     * showing the date the user registered
     */
    add_filter( 'manage_users_columns', 'my_custom_user_columns', 99, 1 );
    function my_custom_user_columns( $columns ) {
    
    	// add my custom columns
        $columns['user_registered'] = 'Registered';
    
    	// return columns
        return $columns;
    }
    
    /**
     * gets the data for the custom column for each user.
     */
    add_filter('manage_users_custom_column','get_my_custom_columns',10,3);
    function get_my_custom_columns( $value, $column_name, $user_id )
    {
    	// if this is the Registered column
    	if ( 'user_registered' == $column_name ) {
    
    		// get the user data as an object
    		$user = get_userdata( $user_id );
    
    		// format date as mm/dd/yyyy
    		return date( "m/d/Y", strtotime( $user->user_registered ) );
    	}
    
    	return $value;
    }
    
    /**
     * Make the "Registered" custom column sortable
     */
    add_filter('manage_users_sortable_columns', 'my_custom_column_sortable');
    function my_custom_column_sortable( $columns ) {
    	$custom = array ( 'user_registered' => 'user_registered' );
    	return wp_parse_args( $custom, $columns );
    }
    
    /**
     * Sort the "Registered" custom column
     */
    add_filter( 'request', 'my_custom_column_orderby' );
    function my_custom_column_orderby( $vars ) {
        if( isset( $vars['user_registered'] )
    		&& 'status' == $vars['user_registered'] ) {
            $vars = array_merge( $vars, array(
                'meta_key' => 'user_registered',
                'orderby' => 'user_registered'
            ) );
        }
        return $vars;
    }
    
    add_action('admin_head', 'remove_color_options');
    function remove_color_options() {
       global $_wp_admin_css_colors;
       $_wp_admin_css_colors = 0;
    }
    
    add_action('admin_head','remove_url_bio');
    function remove_url_bio(){
    	echo "\n" . '<script type="text/javascript">jQuery(document).ready(function($) {
    	$(\'form#your-profile label[for=url], form#your-profile input#url\').hide();
    	$(\'form#your-profile label[for=description], form#your-profile textarea#description, form#your-profile span.description\').hide();
    	});
    	</script>' . "\n";
    }
    
    /**
     * Removes unused contact info fields
     *
     * You don't have to remove them all.  If you want to keep
     * one or two of the defaults, just remove the line(s) that
     * do/don't apply.  How remove twitter, facebook, google profile, about page
     */
    add_filter( 'user_contactmethods', 'remove_contact_fields', 10, 1 );
    function remove_contact_fields( $contactmethods ) {
    	unset( $contactmethods['aim'] );
    	unset( $contactmethods['jabber'] );
    	unset( $contactmethods['yim'] );
    	unset( $contactmethods['twitter'] );
    	unset( $contactmethods['facebook'] );
    	return $contactmethods;
    }
    
    /**
     * Redirect to /nbc-documents/ when a user logs in
     */
    add_filter( 'wpmem_login_redirect', 'my_login_redirect' );
    function my_login_redirect() {
    	return 'http://newportbayclub.com/login/nbc-documents/';
    }
    
    /**
     * Removes the extra social fields that Headway Theme adds to the user profile
     */
    add_action( 'after_setup_theme', 'remove_headway_social_fields' );
    function remove_headway_social_fields() {
    	remove_filter('user_contactmethods', array('HeadwaySocialOptimization', 'add_headway_contact_methods'));
    }
    
    /**
     * Document Gallery Plugin open file in new window
     */
    function dg_target_blank(){ ?>
    <script type="text/javascript">
      jQuery(document).ready( function(){
          jQuery('.document-icon > a').attr('target', '_blank');
      } );
    </script>
    <?php }
    add_action( 'wp_print_footer_scripts', 'dg_target_blank' );

    I added the code and still no luck. I tried different browsers.

    Now I am wondering if the problem is a conflict with another plugin and/or the fact the page requires prior login to view. Only other active plugin is WP-Members (Chad Butler).

    You are welcome to take a look. Site is still under construction
    http://newportbayclub.com/login/
    login: member2
    pswd: 123456

    No, neither worked. I tried different browsers.

    Plus had syntax error in first option for the line with closing </script> before opening <?php

    At least the piece of code has gone from bottom of each page!

Viewing 15 replies - 1 through 15 (of 29 total)