Closed

Fix and Refactor [url removed, login to view] template

This is the Wordpress starter theme that I have built: [url removed, login to view]

I have written functions that input content into my Wordpress pages. The only way that this content is shown is if the page has a checkmark telling the function to show or not.

View the [url removed, login to view] image attached to view a screenshot of these checkmark options.

The options can be seen in the upper right hand corner of the screenshot and are available on each Wordpress page and post across this entire theme - giving every page and every post the ability to hide or show certain content.

We will now take a look at just one of these functions (the google map function) to explain the logic being performed when a user decides to use the checkbox to hide or show the map.

View the [url removed, login to view] image attached to view a screenshot of the map section function code.

This function will input a map into a page depending on if the page has the map option checked or not. The checks I am processing to accomplish this are simple. I'll explain using two examples:

1st Check Example

// The below code will input a map always if the page is a 404 or search page. In other words - it doesn't check any page options - it simply executes if the one page statement renders true.

<?php if (is_search() OR is_404()) { css_inner_map_section(); } ?>

2nd Check Example

// The below code will input a map ONLY if the page is an archive or index page AND the page option is ALSO set to show. In other words - it checks what kind of template is being used AND THEN checks the page options and ONLY executes if BOTH statement are true.

<?php elseif (is_archive() OR is_home()) { if ($map_check_global == 'no') { css_inner_map_section(); } else {} } ?>

These are the types of checks that all my functions are processing. By leaving the last "else" empty I ensure that all content that is supposed to be "hidden" never even loads onto the page. This is my way of limiting HTTP requests on pages while effectively hiding/showing sections of code without using CSS or jQuery. :)

Ok... Now look at this page: [url removed, login to view]

Now view the [url removed, login to view] image attached to view a screenshot of the blog page options.

All checkboxes are left empty so all possible content is being shown (you check each section to hide it). And if you look at the live blog page again you should see the title, description, author, timestamp, total comment count, testimonial section, contact section, map section and footer section. So you can see how this is helpful for quick customization.

So what is the problem?

The problem is that sometimes I am getting the wrong info on certain pages OR the info I have selected to hide is actually showing up (this happens only on a few odd pages like a taxonomy page, or the home page). I believe all this is happening as a result of the "checks" that I am performing. I am unfamiliar with the Wordpress page hierarchy and with IF statements and am certain the issue is being caused because:

1) I am not performing my PHP IF statements in the correct order

2) I am possibly passing in the wrong ID

Also, my code is quite redundant, but I don't understand PHP or IF statements well enough to make it not as repetitive.

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 on all Wordpress pages (home page, archive pages, category pages, taxonomy pages, single pages, regular pages, search page, 404 page etc... you get the idea).

Any Questions? Again - most all of this is already working and working quite well - so it's not as big of a job as it would seem. It shouldn't take long for a seasoned Wordpress developer to run through it and correct it.

I would like to do this project at a fixed rate.

Skills: PHP, WordPress

See more: php fix rss description, title description scrapper php, php template page technology, php scripts generate page title, php code generate page title, page indexed title description link requested clientavoid nofollow links client links follow client siteavoid linking websites b, php image upload title description, php bug fix job description, free php script single page template creator, wordpress options page template, php page error fix, php search results page, php form single page, php scripts enquiry page, php data entry page, template aspnet ging php template, stream flv via php template, php info asp page, php menu loads page, php mysql sign page, convert website template master page, php send link page

About the Employer:
( 30 reviews ) Greenville, United States

Project ID: #12239377

13 freelancers are bidding on average $127 for this job

arhamsoftltd

Hello Tad, Good Day! I am a full stack PHP/WordPress developer with 10 years experience, I am very much comfortable to fix the issue and refactor function to accurately input content. I want to work on hourly bas More

$315 USD in 5 days
(111 Reviews)
8.2
nmans

We are highly interested to work with you on this project and can assure you quality results ready to start immediately some of our developed websites are listed below Wordpress: http://www.wilsontenniscamps.c More

$526 USD in 10 days
(468 Reviews)
8.1
arunsingla32

Hi Thanks for your invitation. I have 5+ years of experience in wordpress & have in-depth knowledge about themes, plug-in customization, blog and API elements. I have gone through your requirement and will f More

$128 USD in 2 days
(129 Reviews)
7.8
VnBestSolutions

Dear Sir. We claim to get it done perfectly for you EXACTLY in the way you want it - Kindly give we a chance and we will prove myself - Ready to prove our words, let's get it done right away and I mean RIGHT AWAY !! Lo More

$133 USD in 3 days
(160 Reviews)
6.7
techwelfare

yes, let's clarify the requirement in details also if you want us to share our skill and previous work let us know.. hope to hear you soon.. Thanks & Regards PROMITI

$146 USD in 4 days
(127 Reviews)
6.8
dpbhatt02

Hey, Thanks for inviting me on this PHP based project on wordpress. Yes, i do understand what you want as results. Ready to go from now.. Can we discuss through chat more in details? We are in top 10 web desig More

$90 USD in 2 days
(140 Reviews)
6.7
raisdhaka

Hello, Thank you for inviting me at this project. Still open? lets do this. Ready to start now. Rasel

$55 USD in 1 day
(89 Reviews)
6.2
freeoutsourcer

Read your brief thoroughly and very interested in working on it. I create elegant and appealing experience to satisfy my clients and go the extra miles wherever needed. Portfolio: https://www.dropbox.com/sh/b5mwoha43v More

$35 USD in 5 days
(47 Reviews)
6.3
$30 USD in 1 day
(59 Reviews)
4.7
$25 USD in 1 day
(9 Reviews)
3.3
maheshinc

Hi I have been in this industry for 10 years and such jobs are my daily practice.I can assure you that if you work with me once, you will always work with me for these kind of projects.

$30 USD in 3 days
(1 Review)
3.1
hirakhan2

Hi,  I have review project details and would like to discuss with you regarding the project. Kindly let me know when available. Thank you.

$83 USD in 5 days
(2 Reviews)
2.6
misuahmed

Hello, I would like to offer cooperation on this project. I am very reliable and efficient. The project will be deliver asap.

$50 USD in 1 day
(2 Reviews)
2.8
latifpala

Hi, Thanks for your valuable time :) I have 3 years of experience in wordpress development and i am well aware of wordpress template system.. I can fix the issues that you are having.. Thanks

$30 USD in 1 day
(0 Reviews)
0.0