Static Website No Titles But Still Nav

Somewhere in your page.php template will be a tag containing the_title(), and that’s what you have to delete. In my WordPress theme, for example, the code looks like this: <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <div class=”entry”> <div <?php post_class(); ?>> <div class=”post-meta”> <h1><?php the_title(); ?></h1> … Read more

Editing the nav menu?

The wp_nav_menu function supports multiple styling parameters, http://codex.wordpress.org/Function_Reference/wp_nav_menu For instance you can add a $menu_id and then style the CSS for each <li> along the lines of border-right:1px solid; . Another option is to just add a “|” for the $link_after parameter, but you should probably use the ascii HTML entity value for it which … Read more

only show children of a nav menu

Here you have the solution <ul> <?php $children = wp_list_pages(‘title_li=&child_of=”.$post->ID.”&echo=0’); $subpages = ($post->post_parent) ? wp_list_pages(‘title_li=&child_of=”.$post->post_parent.”&echo=0’) : wp_list_pages(‘title_li=&child_of=”.$post->ID.”&echo=0’) ; if ($children) { ?> <li><?php echo $children; ?></li> <?php } else { ?> <?php echo $subpages; ?> <?php } ?> <?php wp_reset_query() ?> </ul> I used it to make a menu where the case was something like: … Read more

Updated WordPress, now Navigation is Messed Up

It’s not WordPress that messed it up, it’s something with your theme. On the working site, your navigation bar looks like this: <ul class=”sf-menu sf-js-enabled sf-shadow”> <li class=”page_item page-item-4 current_page_item”><a href=”http://www.millermusicllc.com/” title=”Home”>Home</a></li> <li class=”page_item page-item-7″><a href=”http://www.millermusicllc.com/services/” title=”Services”>Services</a></li> <li class=”page_item page-item-11″><a href=”http://www.millermusicllc.com/portfolio/” title=”Portfolio”>Portfolio</a></li> <li class=”page_item page-item-13″><a href=”http://www.millermusicllc.com/about/” title=”About”>About</a></li> <li class=”page_item page-item-126″><a href=”http://www.millermusicllc.com/testimonials/” title=”Testimonials”>Testimonials</a></li> <li class=”page_item page-item-15″><a … Read more

How would I make a function to dynamically determine if user is logged to change navigation menu text?

I’m not really sure what you’re trying to achieve with the is_page parts – maybe I’m missing something – but what if you’d just write: if (is_user_logged_in()) { $my_account = “My Account”; echo ($my_account); } else { $login = “Login/Sign Up”; echo ($login); } return just returns the variables for use in your code, echo … Read more

How to show next/prev link, when it’s not active?

If you check the code for previous_posts_link function in link-template.php file i.e. function previous_posts_link( $label = null ) { echo get_previous_posts_link( $label ); } // get_previous_posts_link function get_previous_posts_link( $label = null ) { global $paged; if ( null === $label ) $label = __( ‘&laquo; Previous Page’ ); if ( !is_single() && $paged > 1 … Read more

the-events-calendar, pagination with tribe_get_events()

Set the offset manually. $offset = ( get_query_var( ‘page’ ) ) ? get_query_var( ‘page’ ) : my_parse_url_for_offset(); function my_parse_url_for_offset() { if( strpos( $_SERVER[‘REQUEST_URI’], ‘/page/’ ) !== false ) { $url = explode( “https://wordpress.stackexchange.com/”, $_SERVER[‘REQUEST_URI’] ); $url_c = count( $url ); for( $i = 0; $i < $url_c; $i++ ) { if( $url[$i] == ‘page’ ) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)