Fix and refactor function to accurately input content
This project received 11 bids from talented freelancers with an average bid price of $36 USD.Get free quotes for a project like this
Project Budget$10 - $30 USD
I have written a function that inputs content (title, timestamp, comment count, widgets, sections etc) into pages depending on the page.
My code is redundant, but I don't understand PHP well enough to make it not as repetitive. I also am running into a few errors where incorrect info is being added to the page. I believe I am passing an incorrect ID or I should be passing the ID in a different way or maybe this is because I am outside the loop? I am not sure...
The end goal is to have this function reduced in size (cleaned up with not as many if statements and not as many attempts to get the ID) and for it to accurately check and input the content I am asking it to input (home page, archive page, category page, taxonomy page, single page, regular page, search page, 404 page etc... you get the idea)
I'll walk you through my function for you to understand what is happening - but it's pretty straightforward. Functions are placed in my pages and these functions are only called if the page has checked the section to show. See screenshots for more info.
Browse Related Skills
Other things people do on Freelancer
Looking to make some money?
- Set your budget and the timeframe
- Outline your proposal
- Get paid for your work
Hire Freelancers who also bid on this project
Looking for work?
Work on projects like this and make money from home!Sign Up Now
- The New York Times
- Wall Street Journal
- Times Online