Menu – custom structure

Problem is fixed. Here is the solution: functions.php register_nav_menu( ‘primary’, __( ‘Primary Menu’) ); class Menu_With_Description extends Walker_Nav_Menu { function start_el(&$output, $item, $depth, $args) { global $wp_query; $indent = ( $depth ) ? str_repeat( “\t”, $depth ) : ”; $class_names = $value=””; $classes = empty( $item->classes ) ? array() : (array) $item->classes; $class_names = join( … Read more

featured images – custom links

Look at the specified link within the featured-image in the last part of your snippet. You’ll have to update the_permalink() with your custom link, too: <div class=”featured-image”> <a href=”https://wordpress.stackexchange.com/questions/106791/<?php echo esc_url( $more_link ); ?>”><?php print_thumbnail( $thumb, $thumbnail[“use_timthumb”], $title, $width, $height, ” ); ?></a> </div> <!– .featured-image –>

How to duplicate “Pages” section in the control panel?

This should fairly closely mimic “Pages”. function gallery_type_custom_init() { $args = array( ‘public’ => true, ‘label’ => ‘Gallery’, ‘capability_type’ => ‘page’, ‘hierarchical’ => true, ‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’, ‘excerpt’, ‘page-attributes’, ‘custom-fields’ ) ); register_post_type( ‘Gallery’, $args ); } add_action( ‘init’, ‘gallery_type_custom_init’ ); If you need this to use your custom page templates, though, … Read more

Problems with a custom meta_box

You are not including any previously set values in the input field. $value = get_post_meta($post_id->ID,’event-link’,true); <input type=”text” style=”padding:10px;” value=”‘.$value.'” name=”event-link”/> Note that the meta box callback get a post object not just an ID. Additionally, you are not saving your fields at all. Instead you are saving either 1 or 0. If you want to … Read more

display certain category on custom template page

You should not use category parameter to query custom taxonomy instead you should use tax_query parameter or directly custom taxonomy name as shown in the following query. query_posts( array( ‘post_type’ => ‘ublalfieportfolio’, ‘ublalfieportfolio-categories’ => ‘parketten’, ‘posts_per_page’ => -1) ); Refer this page to know how to use custom taxonomy parameter in custom query.

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