meekbot
  • Member for 8 years, 8 months
  • Last seen more than 4 years ago
  • Tampa, FL
Handling duplicates with wp_insert_term()
Accepted answer
5 votes

if ( is_wp_error($term_id) ) { // oops WP_Error obj returned, so the term existed prior // echo $term_id->get_error_message(); } See if that works for you.

View answer
Hide Parent if No Children
Accepted answer
2 votes

<?php if ($post->post_parent) { //We are a child, print out sub menu wp_list_pages( array('title_li'=>'','include'=>$post->post_parent) ); wp_list_pages(...

View answer
Add Parent to Subpage List
Accepted answer
2 votes

<?php if($post->post_parent){ $children = wp_list_pages("title_li=&include=".$post->post_parent."&echo=0"); $children .= wp_list_pages("title_li=&child_of=".$post->...

View answer
Best place to call xdebug helper functions?
Accepted answer
1 votes

They recommend putting it into the wp-config.php file. You can read more about it from the codex Editing wp-config It is quite a long document but the error info is found at 2.15 Configure Error ...

View answer
How to trigger $_GET request within admin plugin page?
0 votes

<form method="get" action="do_it.php" enctype="multipart/form-data"> In the action part of your form you should include the php file that is responsible for processing that hidden form variable,...

View answer
How do you return a menu with the menu name?
0 votes

$menu = wp_nav_menu( array('theme_location' => 'home_blocks', 'echo' => 0) ); var_dump($menu); //works just fine You are essentially overriding all the defaults that wp_nav_menu has when you ...

View answer
How to make Home Menu( Front Page) use index.php instead of page.php
0 votes

So a quick fix would be to backup index.php and rename your original index.php to something like page-home.php, that way you can retain all the changes you have already made.

View answer