My Site: bayareacre.com
]]>It can be found here
The error reads:
Notice: Trying to get property of non-object in /hermes/bosoraweb073/b2912/nf.olivernat/public_html/e-ternity/wp-includes/nav-menu.php on line 591
Any ideas would b e greatly appreciated – could not find any solutions to similar issues online – and very limited similar issues were even out there!
Thank you
]]>I am trying to change the header of theme Nature 3.17.4 from all the futures like Archives, Recently, RSS to regular pages.
In Short, I want that the header will be regular menu.
I know that this menu is in nav.php and I am asking for your help to change it.
Thank you.
]]>I used the qTranslate language chooser php code to display the language chooser in the navigation menu. The code of the nav.php file is as follows:
[Code moderated as per the Forum Rules. Please use the pastebin]
Unfortunately the subscribe drodpdown does not recognize the qtranslate flags being there and are forced to be in the 2nd line. I want only 1 line in the nav menu, with the flags to be at the very right. My style.css that displays the nav menu is as follows:
[CSS moderated as per the Forum Rules. Please post a link to your site instead.]
Can anyone help me adjust the files so that the flags and dropdowns are in one line, with flags at the very right ?
]]>I’m trying to create a custom navigation bar in my nav.php file, which will check a number of categories. If it is a cateogry with no sub-categories but has posts, it will start an unordered list and print the post titles belonging to that category. If the category has sub categories, it will print the sub category name and start another second level unordered list and proceed to print out the post titles of the sub-category.
I have been successful in getting it to print out the nested unordered lists in exactly the way I want, however when I click on a post title, it links to the correct URL, but carries over the post ID from the last post included in the WP_Query in the nav.php, thus all the text and images are incorrect.
I have thoroughly searched around, and was under the impression that a WP_Query is effectively terminated with the endwhile; and endif; statements?
Here is the code as it appears in my nav.php. Any help would be really appreciated
<ul><?php
$parentCatID = '';
$reqCategories=get_categories('include=2,3,4,5,6,7,8,9');
foreach($reqCategories as $category) {
// if category has no parent, then we want to print it
if ($category->category_parent == 0) {
// print primary category listings
echo "<li><a href=\"".get_category_link($category->cat_ID)."\" title=\"".$category->cat_name."\">".$category->cat_name."</a><ul>";
// setting current cateogry as the parent category
$parentCatID = $category->cat_ID;
// if this primary category has no sub-categories, but has posts, we want to display them
$primaryCatPosts = new WP_Query(array('cat__in' => array($parentCatID)));
if($primaryCatPosts->have_posts()) : while($primaryCatPosts->have_posts()) : $primaryCatPosts->the_post();
$postTitle = the_title('', '', FALSE);
$postLink = get_permalink();
echo "<li><a href=\"".$postLink."\" title=\"".$postTitle."\">".$postTitle."</a></li>";
endwhile; endif;
// and display the sub-category listing
$subCategories=get_categories('child_of='.$parentCatID);
foreach($subCategories as $category) {
echo "<li><a href=\"".get_category_link($category->cat_ID)."\" title=\"".$category->cat_name."\">".$category->cat_name."</a><ul>";
$subCatPosts = new WP_Query("cat=$category->cat_ID");
if($subCatPosts->have_posts()) : while($subCatPosts->have_posts()) : $subCatPosts->the_post();
$postTitle = the_title('', '', FALSE);
$postLink = get_permalink();
echo "<li><a href=\"".$postLink."\" title=\"".$postTitle."\">".$postTitle."</a></li>";
endwhile; endif;
echo "</ul></li>";
}
echo '</ul></li>';
}
} $parentCatID = '';
?></ul>
To give me a rendered HTML output such as:
<ul>
<li>PARENT CAT 1
<ul>
<li>CHILD POST 1</li>
<li>CHILD POST 2</li>
</ul>
</li>
<li>PARENT CAT 2
<ul>
<li>SUB CAT 1
<ul>
<li>CHILD POST 3</li>
<li>CHILD POST 4</li>
</ul>
</li>
<li>SUB CAT 2
<ul>
<li>CHILD POST 5</li>
<li>CHILD POST 6</li>
</ul>
</li>
</ul>
</li>
</ul>
]]>Any help is greatly appreciated!
]]>