global categories – Share specific categories in wordpress multisite

Here is a solution I found- // even before any taxonmy/terms are initialized, we reset the tables add_action( ‘init’, ‘the_dramatist_change_tax_terms_table’, 0 ); // on blog switching, we need to reset it again, so it does not use current blog’s tax/terms only // it works both on switch/restore blog add_action( ‘switch_blog’, ‘the_dramatist_change_tax_terms_table’, 0 ); function the_dramatist_change_tax_terms_table(){ … Read more

Adding a category view to a page

Sorted it… get_header(); ?> <div id=”content” class=”site-content inner”> <div id=”primary” class=”content-area”> <main id=”main” class=”site-main” role=”main”> <p class=”sixhundred”>Intro.</p> <!– START OF THE FLEX CONTAINER, THE UNORDERED LIST –> <ul class=”grid-wrap”> <!– WP LOOP STARTS HERE –> <?php if ( have_posts() ) : query_posts( “category_name=basic-skills” ); while ( have_posts() ) : the_post(); ?> <!– LIST ITEM FOR … Read more

Need help to structure our a complex hierarchy

More than categories, you have custom taxonomy, it’s easy to add custom taxonomy to post edit screen and retrieve these custom taxomnomies according to any logic with a custom WP_Query. An example: function continent_init() { // create a new taxonomy register_taxonomy( ‘continent’, ‘post’, array( ‘label’ => __( ‘Continent’ ), ‘rewrite’ => array( ‘slug’ => ‘continent’ … Read more

show posts in archive page based on selected catagory

You can use following code for category name ‘The_Category_Name’, ‘posts_per_page’ => -1 ) ); // The Loop while ( have_posts() ) : the_post(); echo ‘</li>’; the_title(); echo ‘</li>’; endwhile; // Reset Query wp_reset_query(); ?> Here replace The_Category_Name by name of your category

Ajax Response Error

Double comment blocks makes me the same problem: /* … */ */ Try to remove all commented blocks from your functions.php or included sub-functions. Clean your functions.php and add one by one function and you will find the issue. Third thing was PHP passing by reference, try to avoid it.

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