Simple Help

Hello Everybody!
I am a php beginner. I just started to edit the home page harvestofhopefamily.com/index.php . But inside this page there is below code:

                                             <div class="posts">
						<div class="posts-inner">
							<?php index(); ?>	
						</div>
					</div>

The parts I want to edit are inside this code. Where can I find the index() file so I can edit to suit my needs? Please help me.

Thanks
Azizul

no idea, not sure if its a wordpress file or a custom function. look on the top of the index page and see what’s being included or required (include() or require()), then look in those files to see if that function exists.

Hi! Thanks for your reply. Yes there are three files:

define(‘PAGE’,‘home’);
define(‘TITLE’,‘Home’);

if(isset($_SERVER['SUBDOMAIN_DOCUMENT_ROOT'])){
	$_SERVER['DOCUMENT_ROOT'] = $_SERVER['SUBDOMAIN_DOCUMENT_ROOT'];
}

require_once $_SERVER[‘DOCUMENT_ROOT’] . ‘/common/inc/header.inc.php’;
require_once $_SERVER[‘DOCUMENT_ROOT’] . ‘/common/inc/ad.inc.php’;
require_once $_SERVER[‘DOCUMENT_ROOT’] . ‘/common/inc/footer.inc.php’;

Thnx

index() might be one of those files, unless there’s other includes inside those, then you’re going to have to through each one until you find it.

Hello Richei!
Thanks for your help. I found the function named index() Now I am able to edit the page. Here is the function in header.inc.php file.

<?php if(!defined('PAGE')){ define('PAGE',''); } if(!defined('TITLE')){ define('TITLE',''); } $services = array( array( 'title'=>'Road to Foster Care & Adoption', 'img'=>'common/images/img-2.png', 'content'=>'At Harvest of Hope, we realize that foster children who require out-of-home placement can have a loving and nurturing environment with the intervention of a caring and committed community.', 'link'=>'services.php' ), /*array( 'title'=>'Become a Sponsor', 'img'=>'common/images/HOH_banners_sponsorsmall_021012.png', 'content'=>'Your sponsorship and support will go a long way in creating solutions for children in need of foster and adoptive families. We welcome your partnership and thank you in advanced for selecting Harvest of Hope as your charity of choice.', 'link'=>'sponsorship.php' ),*/ array( 'title'=>'Supporting Foster & Adoption Families', 'img'=>'common/images/img-1.png', 'content'=>'We value the contribution of foster and adoptive parents as essential members of the team. Harvest of Hope provides needed support that is believed to be essential in protecting and nurturing children at risk and strengthening families.', 'link'=>'supporting.php' ), array( 'title'=>'Partnership', 'img'=>'common/images/img-3.png', 'content'=>'Faith and community-based organizations, individuals, caretakers, child welfare and social service agencies, and corporate partners working together to address foster care needs.', 'link'=>'partnership.php' ), array( 'title'=>'First Baptist Church', 'img'=>'common/images/img-6.png', 'content'=>'First Baptist Church of Lincoln Gardens (FBCLG) exists today as a branch of the great tradition of African-American Baptist Churches.', 'link'=>'http://fbcsomerset.com' ), array( 'title'=>'Thank you!', 'img'=>'common/images/thankyou2.jpg', 'content'=>'We would like to express our sincere gratitude to all those who have supported us throughout 2012 and those who have recently made donation of holiday gifts for the children. You have been consistent in your support to the program and are true partners with us our in creating solutions for children in need of out of home placement;
We are grafeful to each of you.
We wish you GOD continued peace blessings and prosperity for 2013. ', //'link'=>'http://cjcdc.org' 'link'=>'thankyou.php', ), /*array( 'title'=>'3rd Annual Fathers Day Brunch', 'img'=>'common/images/fathersday.jpg', 'content'=>'Harvest of Hope Family Services Network, Inc. cordially invites you to attend the 3rd Annual Fathers Day Brunch Join Us in Honoring Men Who Have Championed the Cause for Children', 'link'=>'fathers_day.php', ),*/ /*array( 'title'=>'3rd Annual Fathers Day Brunch', 'img'=>'common/images/fathersday.jpg', 'content'=>'Harvest of Hope honors and celebrates Men Who Have Championed the Cause for Children at 3rd Annual Fathers Day Brunch and Silent Auction.', 'link'=>'fathersdaybrunch3.php', ),*/ /*array( 'title'=>'Event-5K Run/Walk', 'img'=>'common/images/walk.jpg', 'content'=>'Join us on Saturday, May 4, 2013 for the 2nd Annual Harvest of Hope "Destination Home" 5K Run/Walk at the North Brunswick Community Park (2053 Route 130 South). ', 'link'=>'eventbrite.php', ),*/ array( 'title'=>'CJCDC', 'img'=>'common/images/img-5.png', 'content'=>'Central Jersey Community Development Corporation was formed to improve the social, educational and economic conditions in the community surrounding the.', //'link'=>'http://cjcdc.org' 'link'=>'http://fbcdc.com', ), array( 'title'=>'Press Release', 'img'=>'common/images/press.jpg', 'content'=>'Keeping the Dream Alive for Children in New Jersey Foster Care Harvest of Hope will celebrate its 1,000th child placed in a home during Martin Luther Kings Commemoration Weekend. - January 25, 2013

SOMERSET, N.J. – Since 1996, Somerset County‐based Harvest of Hope Family Services Network, Inc., has recruited and trained 435 families to become licensed foster families. During the month of December, Harvest of Hope accomplished a significant milestone with the placement...', //'link'=>'http://cjcdc.org' 'link'=>'press_release.php', ), array( 'title'=>'Press Release', 'img'=>'common/images/press-thumbnail.jpg', 'content'=>'SOMERSET, N.J. – The Annie E. Casey Foundation reported in 2011 that there are 7,018 children in the New Jersey foster care system and close to 800 children are awaiting adoption. Harvest of Hope Family Services Network, Inc. and Rev. Dr. DeForest B. Soaries, Jr., senior pastor of First Baptist of Lincoln Gardens, will launch the 2013 Pastors and Ministers Luncheon on Wednesday, March 27, at 11:30 a.m. at the Tenth Street Baptist Church in Camden, NJ.', 'link'=>'press_release2.php', ), ); function index($total = 6){ global $services; for($i = 0; $i < $total; $i++){ $service = $services[$i]; $title = $service['title']; $img = $service['img']; $content = $service['content']; $link = $service['link']; $blank = ''; if(strstr($link, 'http://')){ $blank = 'target="_blank"'; } if(!strstr($content, '<ul')){ $content = '

' . $content . '

'; } echo '

' . $title . '

' . $title . '
' . $content . '
click hereButton
'; } } ?>

not really the best way of doing the events, but if you don’t have a lot of events, then it probably works pretty well. I’d just create a database table, then you don’t have to comment out events you don’t need, just put a show-until date in there.

But I am still in trouble.
When I am changing the value of title, img, content, and link in the arrays the changes are remaining unchanged.

I am confuse, if it is the right place where I need to make the changes. Please help me.

Thanks

if it has /* in front and */ at the end, then its not going to show, its commented out.

Sponsor our Newsletter | Privacy Policy | Terms of Service