How to create a drop down list with pages to a themes options page?

I have found the solution. I used the wordpress function wp_dropdown_pages <?php function combo_select_page_callback() { $options = get_option(‘function plugin’); wp_dropdown_pages( array( ‘name’ => ‘function plugin[ID used to identify the field throughout the theme]’, ‘echo’ => 1, ‘show_option_none’ => __( ‘&mdash; Select &mdash;’ ), ‘option_none_value’ => ‘0’, ‘selected’ => $options[‘ID used to identify the field throughout … Read more

WordPress 3.5 dropdown menu

For the moment based on your question I am assuming you want a single menu, which when hovering over a menu item, its child items are displayed in a drop down menu. Following this tutorial should give you a horizontal menu with vertical drop downs: http://codex.wordpress.org/Creating_Horizontal_Menus Repeat for each menu you need. For more on … Read more

Filter Select results based on selection

Seeing as my comments seemed to answer the question: To get access to the URL params you want $wp_query->query_vars[‘myvar’]: http://wordpress.org/support/topic/how-to-pass-value-in-wordpress-url, e.g.: <?php global $wp_query; $node_id = 0; $args = array( ‘post_type’ => ‘jobs’, ‘category_name’ => $wp_query->query_vars[‘position_name’] ); $the_query = new WP_Query( $args ); The other parts of the question aren’t really WordPress issues, so Stack … Read more

How to save multiple options from a dropdown in user profile

You will need an opening select tag that tells PHP it is an array. Something along the lines of the following should get you on your way… <?php // Display Fields add_action( ‘show_user_profile’, ‘add_multiple_choice_dropdown ‘ ); add_action( ‘edit_user_profile’, ‘add_multiple_choice_dropdown ‘ ); function add_multiple_choice_dropdown ( $user ) { $current_selections = get_user_meta( $user->ID, ‘multi_dropdown’, true ); ?> … Read more

How to convert custom post type based list to a dropdown list?

the_title() and the_permalink() are functions that automatically echoed. Use in this case get_the_title() and get_permalink(). the code should look something like this: while ( $query->have_posts($post->ID) ) : $query->the_post(); echo ‘<li><a href=”‘. get_permalink(). ‘”>’ .get_the_title() .'</a></li>’; endwhile; Here is another way using the_title and the_permalink: while ( $query->have_posts($post->ID) ) : $query->the_post(); ?> <a href=”https://wordpress.stackexchange.com/questions/191514/<?php the_permalink(); ?>” … Read more

metabox select – frontend display

$change = get_post_meta($post->ID, $key, ‘resume_change_location’, true); From https://developer.wordpress.org/reference/functions/get_post_meta/ get_post_meta returns an array, not an object so you need to use $change[‘index’] The other thing is within your meta box you seem to be saving a string not an array so foreach is going to fail. The below should work… $change = get_post_meta( $post->ID, $key, ‘resume_change_location’, … Read more

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