Where to insert customize_register in wordpress plugin

You can use the customize_register action like this: function my_customize_register( $wp_customize ) { /* Just use the $wp_customize object and create a section or use a built-in section. */ $wp_customize->add_section( ‘my_section’, array( ‘title’ => ‘My Section’, ‘priority’ => 30, ) ); /* Now you can add your settings … */ $wp_customize->add_setting( ‘my_options[my_first_option]’, array( ‘default’ => … Read more

Bulk product editing in wordpress

I think you may be misunderstanding something (or not fully explaining something). If you click the “Edit” link under each post, it’ll take you to the edit page for that post/page/whatever. The bulk edit actions are the ones in the dropdown on the top bar. You need to select as many posts as you want, … Read more

Function to query by custom field and category

This should work. Just make sure that meta key is Project ID. function projects_posts() { global $post; $project_posts = get_posts( array( ‘post__not_in’ => array( $post->ID ), ‘category_name’ => ‘team-resources’, ‘meta_key’ => ‘Project ID’, ‘meta_value’ => get_post_meta( $post->ID, ‘Project ID’, 1 ) ) ); $output=”<ul>”; foreach ( $project_posts as $project_post ) { $output .= ‘<li><a href=”‘ … Read more

insert autofocus in a custom taxonomy form

You can use wp_register_script() then wp_enqueue_script() to inject javascript into wp admin. functions.php or plugin (my personal recc would be a simple plugin): wp_register_script( ‘focus-tag-name-script’, ‘path/to/script.js’ , 10 ); wp_enqueue_script( ‘focus-tag-name-script’ ); script: jQuery( window ).on( ‘load’, function() { jQuery( ‘input[name=”tag-name”]’ ) .focus() // place cursor in field .select(); // select field contents } ); … Read more

Integrate wordpress before hosting

WordPress requires PHP & MySQL (and mod_rewrite or equivalent is very helpful to have, too), so if you’re running those on the machine where your unhosted website currently resides, you can run WordPress. If you’re not, you can’t. You can install PHP and MySQL to run locally on just about any OS you can name … Read more

Changing a setting in the wp-admin/customize.php reverts CSS styles to parent theme [closed]

The changes were being made in a stylesheet that is auto-generated by the parent theme. In the specific case of the Cherry parent theme (which is widely used in templates sold on themeforest, templatemonster etc), you cannot make stylesheet changes in reserved files such as main-styles.css (Despite them existing in a child theme). The solution … Read more