Click here to Skip to main content
14,364,335 members

Web Development

 
PinnedHow to get an answer to your question Pin
Chris Maunder4-Sep-10 3:25
adminChris Maunder4-Sep-10 3:25 
PinnedHOW TO ANSWER A QUESTION PinPopular
Chris Maunder12-Jul-09 23:40
adminChris Maunder12-Jul-09 23:40 
QuestionPlayer ranking Pin
padre_17-Nov-19 6:16
memberpadre_17-Nov-19 6:16 
QuestionMessage Closed Pin
14-Nov-19 7:23
memberMember 1465555114-Nov-19 7:23 
QuestionTransaction scope and web apis Pin
Ger Hayden14-Nov-19 0:16
memberGer Hayden14-Nov-19 0:16 
AnswerRe: Transaction scope and web apis Pin
Eddy Vluggen14-Nov-19 0:42
mveEddy Vluggen14-Nov-19 0:42 
PraiseRe: Transaction scope and web apis Pin
Ger Hayden14-Nov-19 1:07
memberGer Hayden14-Nov-19 1:07 
GeneralRe: Transaction scope and web apis Pin
Richard Deeming14-Nov-19 2:33
mveRichard Deeming14-Nov-19 2:33 
GeneralRe: Transaction scope and web apis Pin
Eddy Vluggen14-Nov-19 2:46
mveEddy Vluggen14-Nov-19 2:46 
GeneralRe: Transaction scope and web apis Pin
Richard Deeming14-Nov-19 2:55
mveRichard Deeming14-Nov-19 2:55 
GeneralRe: Transaction scope and web apis Pin
Eddy Vluggen14-Nov-19 3:17
mveEddy Vluggen14-Nov-19 3:17 
GeneralRe: Transaction scope and web apis Pin
Ger Hayden14-Nov-19 11:15
memberGer Hayden14-Nov-19 11:15 
AnswerRe: Transaction scope and web apis Pin
Richard Deeming14-Nov-19 3:42
mveRichard Deeming14-Nov-19 3:42 
GeneralRe: Transaction scope and web apis Pin
Ger Hayden14-Nov-19 11:13
memberGer Hayden14-Nov-19 11:13 
QuestionMessage Closed Pin
11-Nov-19 2:23
memberMember 1465157911-Nov-19 2:23 
QuestionWorkBox is not broadcasting updates. Pin
Member 1088816411-Nov-19 4:53
memberMember 1088816411-Nov-19 4:53 
SuggestionMessage Closed Pin
6-Nov-19 22:43
memberyuwee6-Nov-19 22:43 
QuestionPlease help: “Invalid argument supplied for foreach()” in Wordpress Pin
Member 146471226-Nov-19 14:28
memberMember 146471226-Nov-19 14:28 
Hello!
I´m creating a WP site. In the homepage, i´m getting an error:

Quote:
Warning: Invalid argument supplied for foreach() in /home2/siilverp/public_html/wp-content/themes/mts_steadyincome/page-home.php on line 108


This is the code of page-home.php:

<?php if(!empty($mts_options['mts_featured_posts']) && !empty($mts_options['mts_featured_post_cat'])) { ?>
                <div class="home_article">
                    <?php 
                    foreach ( $mts_options['mts_featured_post_cat'] as $cat_id ) {
                        $featured_query = new WP_Query( apply_filters( 'steadyincome_featured_posts_query', array(
                            'cat' => $cat_id,
                            'posts_per_page' => 1
                        ) ) );


Now, I found that I have to type var_dump. Then, this appears:

Quote:
array(84) { ["mts_logo"]=> string(0) "" ["mts_favicon"]=> string(0) "" ["mts_touch_icon"]=> string(0) "" ["mts_metro_icon"]=> string(0) "" ["mts_twitter_username"]=> string(0) "" ["mts_feedburner"]=> string(0) "" ["mts_header_code"]=> string(0) "" ["mts_analytics_code"]=> string(0) "" ["mts_ajax_search"]=> string(1) "0" ["mts_responsive"]=> string(1) "1" ["mts_rtl"]=> string(1) "0" ["mts_shop_products"]=> string(1) "9" ["mts_prefetching"]=> string(1) "0" ["mts_lazy_load"]=> string(1) "0" ["mts_lazy_load_thumbs"]=> string(1) "0" ["mts_lazy_load_content"]=> string(1) "0" ["mts_async_js"]=> string(1) "1" ["mts_remove_ver_params"]=> string(1) "1" ["mts_optimize_wc"]=> string(1) "1" ["mts_color_scheme"]=> string(7) "#3fc5a4" ["mts_layout"]=> string(8) "cslayout" ["mts_background"]=> array(10) { ["color"]=> string(7) "#ffffff" ["use"]=> string(7) "pattern" ["image_pattern"]=> string(4) "nobg" ["image_upload"]=> string(0) "" ["repeat"]=> string(6) "repeat" ["attachment"]=> string(6) "scroll" ["position"]=> string(8) "left top" ["size"]=> string(5) "cover" ["gradient"]=> array(3) { ["from"]=> string(7) "#ffffff" ["to"]=> string(7) "#000000" ["direction"]=> string(10) "horizontal" } ["parallax"]=> string(1) "0" } ["mts_custom_css"]=> string(0) "" ["mts_lightbox"]=> string(1) "0" ["mts_sticky_nav"]=> string(1) "0" ["mts_show_primary_nav"]=> string(1) "1" ["mts_show_footer_nav"]=> string(1) "1" ["mts_header_section2"]=> string(1) "1" ["mts_header_bottom_text"]=> string(17) "Download my Ebook" ["mts_header_bottom_button_text"]=> string(20) "Start Earning Today!" ["mts_header_bottom_button_link"]=> string(1) "#" ["mts_banner_show"]=> string(1) "1" ["mts_banner_image"]=> string(81) "https://seiscifrasonline.com/wp-content/themes/mts_steadyincome/images/header.jpg" ["mts_banner_title"]=> string(34) "Start Earning Steady Income Today!" ["mts_banner_texts"]=> string(156) "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi at nisl lorem, vel porttitor justo. Nunc non mauris elit. Nam enim massa commodo ut placerat." ["mts_button_text"]=> string(16) "Get Started Here" ["mts_banner_button_bg"]=> string(7) "#FF9742" ["mts_arrow_image"]=> string(80) "https://seiscifrasonline.com/wp-content/themes/mts_steadyincome/images/arrow.png" ["mts_form_image"]=> string(80) "https://seiscifrasonline.com/wp-content/themes/mts_steadyincome/images/money.png" ["mts_ribbon_show"]=> string(1) "1" ["mts_banner2_show"]=> string(1) "1" ["mts_social_title"]=> string(66) "Join Over 100,000 People in Our Online Community!" ["mts_banner_social"]=> array(5) { ["facebook"]=> array(5) { ["group_title"]=> string(8) "Facebook" ["group_sort"]=> string(1) "1" ["mts_banner_icon_title"]=> string(8) "Facebook" ["mts_banner_icon"]=> string(8) "facebook" ["mts_banner_icon_link"]=> string(1) "#" } ["twitter"]=> array(5) { ["group_title"]=> string(7) "Twitter" ["group_sort"]=> string(1) "2" ["mts_banner_icon_title"]=> string(7) "Twitter" ["mts_banner_icon"]=> string(7) "twitter" ["mts_banner_icon_link"]=> string(1) "#" } ["gplus"]=> array(5) { ["group_title"]=> string(11) "Google Plus" ["group_sort"]=> string(1) "3" ["mts_banner_icon_title"]=> string(11) "Google Plus" ["mts_banner_icon"]=> string(11) "google-plus" ["mts_banner_icon_link"]=> string(1) "#" } ["youtube"]=> array(5) { ["group_title"]=> string(7) "YouTube" ["group_sort"]=> string(1) "4" ["mts_banner_icon_title"]=> string(7) "YouTube" ["mts_banner_icon"]=> string(12) "youtube-play" ["mts_banner_icon_link"]=> string(1) "#" } ["rss"]=> array(5) { ["group_title"]=> string(3) "RSS" ["group_sort"]=> string(1) "5" ["mts_banner_icon_title"]=> string(3) "RSS" ["mts_banner_icon"]=> string(3) "rss" ["mts_banner_icon_link"]=> string(1) "#" } } ["mts_books_title"]=> string(51) "Recommended readings by John Smith" ["mts_books_image"]=> string(0) "" ["mts_more_book_link"]=> string(1) "#" ["mts_more_book_text"]=> string(10) "More Books" ["mts_featured_posts"]=> string(1) "1" ["mts_featured_post_cat"]=> string(1) "1" ["mts_featured_post_dedup"]=> string(1) "0" ["mts_first_footer"]=> string(1) "0" ["mts_first_footer_num"]=> string(1) "4" ["mts_footer_slider"]=> string(0) "" ["mts_copyrights"]=> string(73) "Theme by MyThemeShop" ["mts_home_post_layout"]=> string(8) "layout-1" ["mts_full_posts"]=> string(1) "0" ["mts_pagenavigation_type"]=> string(1) "1" ["mts_home_headline_meta_info"]=> array(2) { ["enabled"]=> array(3) { ["author"]=> string(11) "Author Name" ["date"]=> string(4) "Date" ["comment"]=> string(13) "Comment Count" } ["disabled"]=> array(0) { } } ["mts_single_post_layout"]=> string(0) "" ["mts_single_headline_meta_info"]=> array(2) { ["enabled"]=> array(4) { ["author"]=> string(11) "Author Name" ["date"]=> string(4) "Date" ["category"]=> string(10) "Categories" ["comment"]=> string(13) "Comment Count" } ["disabled"]=> array(0) { } } ["mts_breadcrumb"]=> string(1) "1" ["mts_author_comment"]=> string(1) "1" ["mts_comment_date"]=> string(1) "1" ["mts_home_social_buttons"]=> string(1) "1" ["mts_social_button_position"]=> string(3) "top" ["mts_social_buttons"]=> array(2) { ["enabled"]=> array(5) { ["facebookshare"]=> string(14) "Facebook Share" ["facebook"]=> string(13) "Facebook Like" ["twitter"]=> string(7) "Twitter" ["gplus"]=> string(11) "Google Plus" ["pinterest"]=> string(9) "Pinterest" } ["disabled"]=> array(2) { ["linkedin"]=> string(8) "LinkedIn" ["stumble"]=> string(11) "StumbleUpon" } } ["mts_posttop_adcode"]=> string(0) "" ["mts_posttop_adcode_time"]=> string(1) "0" ["mts_postend_adcode"]=> string(0) "" ["mts_postend_adcode_time"]=> string(1) "0" ["mts_custom_sidebars"]=> string(0) "" ["mts_sidebar_for_home"]=> string(0) "" ["mts_sidebar_for_post"]=> string(0) "" ["mts_sidebar_for_page"]=> string(0) "" ["mts_sidebar_for_archive"]=> string(0) "" ["mts_sidebar_for_category"]=> string(0) "" ["mts_sidebar_for_tag"]=> string(0) "" ["mts_sidebar_for_date"]=> string(0) "" ["mts_sidebar_for_author"]=> string(0) "" ["mts_sidebar_for_search"]=> string(0) "" ["mts_sidebar_for_notfound"]=> string(0) "" ["mts_sidebar_for_shop"]=> string(12) "shop-sidebar" ["mts_sidebar_for_product"]=> string(15) "product-sidebar" ["last_tab"]=> int(0) } Warning: Invalid argument supplied for foreach() in /home2/siilverp/public_html/wp-content/themes/mts_steadyincome/page-home.php on line 108


And from there, I dont know what to do. Please, note that I dont know anything about programming, and I don't know who to turn to either, so I came to this forum, I hope that you can help me.

Thanks you so much.
AnswerRe: Please help: “Invalid argument supplied for foreach()” in Wordpress Pin
Richard MacCutchan6-Nov-19 22:38
protectorRichard MacCutchan6-Nov-19 22:38 
AnswerRe: Please help: “Invalid argument supplied for foreach()” in Wordpress Pin
jkirkerx7-Nov-19 13:29
professionaljkirkerx7-Nov-19 13:29 
Questionweb development Pin
Member 142901874-Nov-19 2:55
memberMember 142901874-Nov-19 2:55 
AnswerRe: web development Pin
Richard MacCutchan4-Nov-19 3:27
protectorRichard MacCutchan4-Nov-19 3:27 
QuestionJquery fuction not called when I append achor tag . Pin
KGr2830-Oct-19 5:29
memberKGr2830-Oct-19 5:29 
AnswerRe: Jquery fuction not called when I append achor tag . Pin
Richard Deeming30-Oct-19 6:30
mveRichard Deeming30-Oct-19 6:30 
GeneralRe: Jquery fuction not called when I append achor tag . Pin
KGr2830-Oct-19 9:03
memberKGr2830-Oct-19 9:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.