mr_tompe
Forum Replies Created
-
Forum: Themes and Templates
In reply to: I have a big problem with Dynamic Sidebar…Great that you find the problem, but im a newbie to this. Maybe somone could help me with that ?? Im not sure how to do that by my own ??
And i really have to get this to work.
Sorry for my bad english, i do my best.
//Thomas
Forum: Fixing WordPress
In reply to: How to exlude some pages in the nav. menu ??Here is some more code from my header… It must be somthing wrong in this because i get this message from webbrowser.
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /hsphere/local/home/tompe/tompe.com/wp/wp-content/themes/StudioPress/header.php on line 62
And here is the code, i mark line 62 as bold
<div id=”nav”>
<?php
function get_the_pa_ges (){
global $wpdb;
if ( ! $these_pages = wp_cache_get(‘these_pages’, ‘pages’) ) {
$these_pages = $wpdb->get_results(‘select ID, post_title from ‘. $wpdb->posts .’ where post_status = “publish” and post_type = “page” order by ID’);
wp_cache_add(‘these_pages’, $these_pages, ‘pages’);
}
return $these_pages;
}function list_certain_pages($page_ids=”){
$page_ids = explode(‘,’,$page_ids);
$output = ”;
$these_pages = get_the_pa_ges ();
foreach ($these_pages as $thats_them){
$the_page_id = $thats_them->ID;
if (is_page($the_page_id)) {
$addclass = ‘ class=”current_page”‘;
} else {
$addclass = ”;
}
if (isset($page_ids) && in_array($the_page_id,$page_ids)){
$output .= ‘<li’ . $addclass . ‘>ID).'” title=”‘.$thats_them->post_title.'”><span>’.$thats_them->post_title.'</span>’;}
}
return $output;
}
?><?php
if (is_home()) {
$addclass = ‘ class=”current_page”‘;
} else {
$addclass = ”;
}
echo “<li” . $addclass . “><span>Home</span>”;
echo list_certain_pages(‘5,9’);?><div class=”cleared”></div>
</div> <!– Closes Nav –>Forum: Fixing WordPress
In reply to: How to exlude some pages in the nav. menu ??Could anyone look at this code and see if there is something wrong…
$output .= ‘<li’ . $addclass . ‘>ID).'” title=”‘.$thats_them->post_title.'”><span>’.$thats_them->post_title.'</span>’;}
Forum: Fixing WordPress
In reply to: How to exlude some pages in the nav. menu ??Thanks a lot that sounds very interesting. I have now change my code so it look like this, just as tommygun999 sad….
But now my problem is like this, i get this error message from my browser:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /hsphere/local/home/tompe/tompe.com/wp/wp-content/themes/StudioPress/header.php on line 62and line 62 looks like this:
$output .= ‘<li’ . $addclass . ‘>ID).'” title=”‘.$thats_them->post_title.'”><span>’.$thats_them->post_title.'</span>’;}
Any ide what can be wrong ??
Forum: Fixing WordPress
In reply to: How to exlude some pages in the nav. menu ??Thanks a lot that sounds very interesting. I have now change my code so it look like this, just as tommygun999 sad….
But now my problem is like this, i get this error message from my browser:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /hsphere/local/home/tompe/tompe.com/wp/wp-content/themes/StudioPress/header.php on line 62and line 62 looks like this:
$output .= ‘<li’ . $addclass . ‘>ID).'” title=”‘.$thats_them->post_title.'”><span>’.$thats_them->post_title.'</span>’;}
Any ide what can be wrong ??
Forum: Fixing WordPress
In reply to: How to exlude some pages in the nav. menu ??I have search for “wp_list_pages” in header.php, footer.php and sidebar.php. Nothing found ?? I dont want to change the theme because i like it as it is. (exept for menu)
I think it should be in the header.php. But the question is how to remove this two pages from the navigation menu. Any ide ?
———————————————————————
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”https://www.w3.org/1999/xhtml”><head>
<meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />
<title><?php if (is_home () ) { bloginfo(‘name’); echo ” – “; bloginfo(‘description’);
} else { wp_title(”,true); echo ” – “; bloginfo(‘name’); }?></title>
<meta name=”robots” content=”index,follow” />
<meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” />
<link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
<link rel=”alternate” type=”application/rss+xml” title=”<?php bloginfo(‘name’); ?> RSS Feed” href=”<?php bloginfo(‘rss2_url’); ?>” />
<link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
<link rel=”icon” type=”image/x-ico” href=”<?php bloginfo(‘template_url’); ?>/images/favicon.ico” />
<?php wp_head(); ?></head>
<body>
<div id=”wrapper”><div id=”header”>
<div class=”topright”>
<?php include (TEMPLATEPATH . ‘/searchform.php’); ?>
</div>
</div> <!– Closes Header –><div class=”cleared”></div>
<div id=”underheader”>
<div id=”toprss”>“>
<img src=”<?php bloginfo(‘template_directory’); ?>/images/grabrss.gif” alt=”grab our rss feed”></img>
</div><h1 class=”sitename”>“><?php bloginfo(‘name’); ?></h1>
<h2 class=”sitedesc”><?php bloginfo(‘description’); ?></h2></div><!– Closes underHeader –>
<div id=”nav”>
<?php function get_the_pa_ges() {
global $wpdb;
if ( ! $these_pages = wp_cache_get(‘these_pages’, ‘pages’) ) {
$these_pages = $wpdb->get_results(‘select ID, post_title from ‘. $wpdb->posts .’ where post_status = “publish” and post_type = “page” order by ID’);}
return $these_pages;
}function list_all_pages(){
$all_pages = get_the_pa_ges ();
foreach ($all_pages as $thats_all){
$the_page_id = $thats_all->ID;if (is_page($the_page_id)) {
$addclass = ‘ class=”current_page”‘;
} else {
$addclass = ”;
}
$output .= ‘<li’ . $addclass . ‘>ID).'” title=”‘.$thats_all->post_title.'”><span>’.$thats_all->post_title.'</span>‘;
}return $output;
}
?>-
<?php
if (is_home()) {
$addclass = ‘ class=”current_page”‘;
} else {
$addclass = ”;
}
echo “<li” . $addclass . “><span>Home</span>“;
echo list_all_pages();?><div class=”cleared”></div>
</div> <!– Closes Nav –><div class=”topcurvewhite”></div>
<div id=”main”>
———————————————————————Forum: Fixing WordPress
In reply to: How to exlude some pages in the nav. menu ??demetris…. i tried that plugin too, but still it wont work.
Forum: Fixing WordPress
In reply to: How to exlude some pages in the nav. menu ??But thats the strange part, if you look at the code wp_list_pages is missing thats why idont know how to get it right
I found this following code that looks similar and i tried to write it like this way (but it dont work) Sorry for my bad english
-
<?php
if (is_home()) {
$addclass = ‘ class=”current_page”‘;
} else {
$addclass = ”;
}
echo “<li” . $addclass . “><span>Home</span>“;
echo list_all_pages(‘exclude=139,241’);?>