WordPress.org

Ready to get started?Download WordPress

Forums

WP FuneralPress
Changing Facebook Share default text (2 posts)

  1. jvmedia
    Member
    Posted 6 months ago #

    We would like to change the text that shows up when anyone tries to share an Obituary on Facebook. Currently it lists, "Obituaries - Search ObituariesFirst Name : Last Name ... " then lists a bunch of the most recent first names and last names after that. We've made sure there's a title and meta description on the page in which we've embedded the Funeral Press short code. There doesn't seem to be any area in settings to set anything like this.

    If you can let us know how we can change this, it would be most appreciate it.

    http://wordpress.org/plugins/wp-funeral-press/

  2. smartypants
    Member
    Plugin Author

    Posted 5 months ago #

    That is not available for edit currently, editing the core is never recommended but if you need to then you can find the information in the first function of /users/obits.php

    function go_meta(){
    			global $wpdb;
    			if ( get_option('permalink_structure') != '' && class_exists('wpfh_premium') ) { 
    
    		$_GET['id'] = get_query_var('id');
    		$_GET['f'] = get_query_var('f');
    			}
    			if($_GET['id'] !=''){
    
    			$r = $wpdb->get_results("SELECT * FROM  ".$wpdb->prefix ."wpfh_obits  where id = ".$wpdb->escape($_GET['id'])."", ARRAY_A);	
    
    				if( $r[0]['photo']  == ""){ $r[0]['photo'] =get_option('wpfh_obit_default_pic');}
    
    			  $name       = ''.__("Remembering","sp-wpfh").' ' . stripslashes($r[0]['first_name']) . ' ' . stripslashes($r[0]['middle']) . ' ' . stripslashes($r[0]['last_name']) . ' ' . $maiden . '';
    			  $description = substr(stripslashes(strip_tags($r[0]['obituary'])),0,200);
    			  $obit_page = wpfh_obit_page($_GET['id']);
    			  $image = '' . content_url() . '/plugins/wp-funeral-press/thumbs.php?src=' .get_real_image_path ( $r[0]['photo'] ). '&w=400&h=500';
    
    	echo '
    
    <!-- for Twitter -->
    <meta name="twitter:card" content="summary" />
    <meta name="twitter:title" content="'.$name.'" />
    <meta name="twitter:description" content="'.$description.'" />
    <meta name="twitter:image" content="'.	$image.'" />
    
    	<meta property="og:title" content="'.$name.'"/>
    <meta property="og:type" content="article"/>
    <meta property="og:url" content="'. $obit_page.'"/>
    <meta property="og:image" content="'.	$image.'" />
    <meta property="og:description"
          content="'.$description.'"/>';
    			}
    	}

Reply

You must log in to post.

About this Plugin

About this Topic

Tags