Ecommerce Single Product Next Product Link

next_post function is deprecated. You should try this instead: next_post_link and previous_post_link The basic way to use it is like so: This will link to the next post or prev post. <?php next_post_link( ‘%link’, ‘%title’ ); previous_post_link( ‘%link’, ‘%title’ ); ?> If you would like to link to the next post in the same category, … Read more

Ussing page_navi with WP_Query

Just work including that code in the functions file: function mod_query($query){ $entradas = get_category_by_slug(‘anuncios’); if ((!is_admin() && $query->is_main_query())){ $query->set(‘posts_per_page’,”2″); $query->set(‘cat’,’8′); } } add_action(‘pre_get_posts’,’mod_query’); The file to show the content of the category is a normal file (without extra configuration) Thanks to @Pieter Groosen for the orientation.

Display greyed out nav link when there’s not a next or previous post

If you wanted to have a greyed out link, you could swap out posts_nav_link for something like this: <?php if ( ! get_previous_posts_link() ) : ?> <div class=”inactive post-link post-link__previous”>« Previous Posts</div> <?php else : ?> <div class=”post-link post-link__previous”><?php previous_posts_link(); ?></span> <?php endif; ?> And just set the inactive class in your CSS to be … Read more

body_class(); not working with bootstrap navbar fixed top?

Why not use a navwalker to create your bootstrap menu? Try https://github.com/wp-bootstrap/wp-bootstrap-navwalker You can get the fixed-top to add to the menu <nav class=”navbar navbar-default navbar-fixed-top” temscope=”itemscope” itemtype=”http://schema.org/SiteNavigationElement” role=”navigation”> <div class=”container”> <div class=”navbar-header”> <button type=”button” class=”navbar-toggle” data-toggle=”collapse” data-target=”#navbar”> <span class=”sr-only”>Toggle navigation</span> <span class=”icon-bar”></span> <span class=”icon-bar”></span> <span class=”icon-bar”></span> </button> </div> <div class=”collapse navbar-collapse” id=”navbar”> <ul class=”nav … Read more

navbar remove box shadow

You are looking at the wrong element, it is #site-navigation that has the box shadow (and a white background, which also is a problem), so the following worked for me #site-navigation { box-shadow: none; background-color: #fdd4ce; } A vendor prefix should not be necessary.

confused about wp_list_pages() function – how to display selected top pages with all their subpages

When you use include parameter of wp_list_pages you are basically telling it to only include these certain Pages in the list. you should use exclude_tree instead, when using this parameter it will exclude a parent and all of that parent’s child Pages. so something like: $top_pages_to_exclude=”1″; // the top page to be excluded ID, you … Read more

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