THIS PLUGIN IS NO LONGER SUPPORTED
For compatibility with any WordPress theme, use our new IMPress Agents plugin
The Genesis Agent Profiles plugin uses custom post types and templates to create a real estate agent directory for Genesis child themes. Includes sidebar widget to display a featured agent.
- Upload the entire
genesis-agent-profiles
folder to the /wp-content/plugins/
directory
- 通过WordPress的的“Plugins”菜单激活插件
- Start entering agents into the agent directory.
Shortcode usage
To display all agents:
[agent_profiles]
To selectively display only certain agents:
[agent_profiles id="$post_id"]
$post_id
is the ID number of each agent post, separated by comma if more than one. You can find the ID by editing the agent and looking in your browser's address bar for
post=##
.
Optional configuration
The following steps will allow you to connect your Agent Profiles to listings added using the WP Listings or AgentPress Listings plugin.
- Install and activate the Posts 2 Posts plugin. Also make sure the either WP Listings or AgentPress Listings plugin is installed, activated, and listings exist.
- Once activated each listing and each agent profile will have a "Connected..." sidebar widget on the Edit screen. Use this to connect them by clicking the plus sign next to each post you want to connect to the current post. This is reciprocal and only has to be done on one of the two post types.
- Single Agent Profiles will automatically display connected listings.
- The plugin includes a single-listing.php template that will be used if no single-listing.php exists in the child theme. If your theme already includes a single-listing.php template, to display connected agents on single listings, you must do one of two things:
Option 1
- Delete the single-listing.php in your child theme and the plugin's template will be used instead.
Option 2
- Edit your child theme's single-listing.php and include this code to display connected agents:
`add_action( 'genesis_after_post', 'aeprofiles_show_connected_agent' ); // XHTML
add_action( 'genesis_after_entry', 'aeprofiles_show_connected_agent' ); // HTML5
function aeprofiles_show_connected_agent() {
if (function_exists('_p2p_init') && function_exists('agentpress_listings_init') || function_exists('_p2p_init') && function_exists('wp_listings_init')) {
echo'
';
aeprofiles_connected_agents_markup();
echo '
';
}
}`