Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make testimonials into a custom post type so that we can add/remove testimonials. #111

Open
benlk opened this issue May 31, 2019 · 0 comments

Comments

@benlk
Copy link
Collaborator

benlk commented May 31, 2019

function inn_get_testimonial() {
$img_path = get_stylesheet_directory_uri() . '/homepages/assets/img/testimonials/';
$data = array (
array(
'photo_url' => $img_path . 'lahood.jpg',
'text' => '“More than anything, INN has given us a sense that we are not toiling in isolation, that we are part of a larger community of nonprofit news organizations that are thriving through collaboration, pursuit of common goals and expression of mutual support.”',
'name' => 'Lila Lahood',
'org' => 'San Francisco Public Press',
'org_link' => 'http://sfpublicpress.org'
),
array(
'photo_url' => $img_path . 'horvit.jpg',
'text' => '“INN provides support and business-model training for nonprofit news organizations, helping to create a solid foundation upon which they can build.”',
'name' => 'Mark Horvit',
'org' => 'National Institute for Computer Assisted Reporting',
'org_link' => 'http://nicar.org'
),
array(
'photo_url' => $img_path . 'brown.jpg',
'text' => '“INN is the glue that connects the nonprofit news industry and pushes it to move forward, smarter and stronger.”',
'name' => 'Mary Brown',
'org' => 'Voice of San Diego',
'org_link' => 'http://voiceofsandiego.org'
)
);
$num = mt_rand(0, count( $data ) - 1 );
return $testimonial = $data[$num];

Converting to a custom post type would take a few hours.

In the meantime, we have to add testimonials to this list by hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant