Code Food Travel repeat!


How to display image slides / slider in Redux Framework on WordPress

I like Redux Framework (formerly NHP Options) for easily building an interface for theme customization options, however I think they are super mean in providing no documentation (and no very clear documentation) on displaying / rendering the values on your webpage. It’s great that they are all experts in PHP codes and arrays, but not all of us are… so why keep it elitist when these questions are being asked multiple times already in their support forums.

Anyhow, it comes with a neato image slider option – so you can make like an intro slideshow for your website pretty easily. I combined the slider with (my image gallery of choice).

By default your options are called $redux_demo, but i changed mine for a client site i’m working on so mine is called spafiesta_options. In the Redux Framework plugin folder, there’s a sample_config.php file which you can customize. Do a search for the ‘slides’ section, and you’ll find by default the ID for that feature is called ‘slides’.

Below, I’m saying for each slide in the ‘slides’, to display it inside an img tag. Wrap it in your image gallery of choice, and voila! done!

			<!-- Fotorama -->
			<div class="fotorama" data-width="100%" data-fit="cover" data-autoplay="5000" data-height="400" data-max-width="100%" data-ratio="500/333" data-trackpad="false">
				<?php  global $spafiesta_options;
				foreach($spafiesta_options['slides'] as $slide) {
				  echo '<img src="' . $slide['image'] . '">'; 


(Hint for the solution after 1 hr of looking was here:

Convincing Email Scam: Mugged in the Philippines & Need Money

Convincing Email Scam: Mugged in the Philippines & Need Money

I received a pretty convincing email today from a longtime friend who almost never emails me, which said he was in Manila, Philippines – was mugged and needed money sent over. FAKE!

It looked completely real from my iPhone and I freaked out. THANKS FOR NOTHING APPLE.
A friend with me convinced me that it was not a good time to randomly send money to the Philippines given the recent typhoon disaster.

I later rechecked the email from my computer, and THANK THE LORD FOR GMAIL and it’s ACE A++++ spam / phishing detection filter.
It looks much less real given how Google formats emails.

Google’s warning read:

“Be careful with this message. It contains content that’s typically used to steal users personal information.
Learn more / Report this suspicious message / Ignore, I trust this message”

The email subject reads: “Sad News…… ____INSERT SENDER NAME____”  <- at first i was startled because it sounded like a funeral

The email body reads:


This message may be coming to you as a surprise but I need your help.Few days back we made an unannounced vacation trip to Manila Philippines.Everything was going fine until last night when we were mugged on our way back to the hotel.They Stole all our cash,credit cards and cellphone but thank God we still have our lives and passport.Another shocking is that the hotel manager has been unhelpful to us for reasons i don’t know. I’m writing you from a local library cybercafe..I’ve reported to the police and after writing down some statements that’s the last i had from them.i contacted the consulate and all i keep hearing is they will get back to me. i need your help ..I need you to help me out with a loan to settle my bills here so we can get back home, our return flight leaves soon. I’ll refund the money as soon as i get back. All i need is $1,950 ..Let me know if you can get me the money then I tell you how to get it to me.

I’m freaked out at the moment



The reply to address has a carefully constructed address that looks like the owner’s original address. In this case, they added on 2 more numbers but kept the rest basically the same.

According to this blog, first they hack the user’s email, then their facebook to gather their locational data to use – so they sound convincing and factual to their friends. Gross!


Few days back we made an unannounced vacation trip to Manila Philippines.Everything was going fine until last night when we were mugged on our way back to the hotel
Few days back we made an unannounced vacation trip to Manila Philippines.Everything was going fine until last night when we were mugged on our way back to the hotel

NHP Options Framework – Fatal Error

NHP Options is a great plugin but it BREAKS YOUR WORDPRESS TONS if:

1) You try to activate the plugin without adding the activation code in your functions.php file:

 get_template_part('nhp', 'options'); 

2) If you try to use it with certain themes that call a similarly named function: of_admin_head

You see THEME CANNOT BE ACTIVATED FATAL ERROR    or     Cannot redeclare of_admin_head() (previously declared in 

To fix, go to your wordpress PLUGINS folder -> options-framework -> open options-framework.php -> search (cmd+F on mac or cntl+F on PC) for of_admin_head (i found it on line 316 and 319) and rename them both to anything else. I just used of_admin_head_1. Save and reupload file to your plugins, this will resolve the conflict.

note: you will have to remember to re-update this if you upgrade the theme.. so maybe highlight the text where you changed and take a screenshot to keep for memory!

3) You try and SWITCH WORDPRESS THEMES with NHP Options activated. IT WILL BREAK YOUR SITE.

First you have to deactivate the plugin, THEN switch themes, copy over: nhp-options.php + options folder, and reactivate. If you have accidentally broken your site before having a chance to deactivate, simply access your site via FTP -> navigate to plugins folder, rename options-framework to anything else temporarily (like options-framework1) and that will let you back into wordpress because you changed the folder name so it wont be able to access it.

WooCommerce PRODUCTS menu disappears with Custom Post Types Plugin (Conflict)

I’ve racked my brain over this twice now for lengths at a time (I forgot the solution from the first time). When I add a custom post type using WP-Types or Custom Post Types UI, suddenly the ability to add products to WooCommerce disappears. I thought this was a plugin conflict at first, or possibly a conflict with my WP Roots Bootstrap theme. But NO!


WooCommerce PRODUCTS menu disappears because it is using the same MENU POSITION number as the default custom post type menu position. WooCommerce could probably fix this painful headache if they chose a different number! So, double check your custom post type settings, and try a different number (between 5-100).. like 20, or 100. Play with it:

Setting the “Menu position” (integer) for each custom post type:

Default: null – defaults to below Comments
5 – below Posts
10 – below Media
15 – below Links
20 – below Pages
25 – below comments
60 – below first separator
65 – below Plugins
70 – below Users
75 – below Tools
80 – below Settings
100 – below second separator

4 of 14
%d bloggers like this: