Articles of customization

Custom search page and search by title, content and tag

Can someone review my code , I need to know better solutions or any bug. Okey ! , I made a PHP file to get search results by parameters and search by title , content and tag PHP’s head look like: include(‘../../../../wp-config.php’); header(‘Content-type:text/html;charset=utf-8’); $keyword = $_GET[‘k’]; That I will bring search results by jQuery after. […]

Include user defined styles without including wp-load

I’ve looked through the answers on here and none quite match my situation. I have custom CSS that a user can edit and it is saved in the options. I use wp_enqueue_style to include a PHP file with a CSS content header and then load the CSS from the options. However, in order to load […]

$wp_customize->remove_section for customizer setting?

I use an underscores theme and try to remove the nav menu without any result : $wp_customize->remove_section(‘colors’); // works $wp_customize->remove_section(‘background_image’); // ok $wp_customize->remove_section(‘header_image’); // ok $wp_customize->remove_section(‘static_front_page’); // ok $wp_customize->remove_panel(‘widgets’); // ok $wp_customize->remove_panel(‘menu_navs’); // not ok $wp_customize->remove_section(‘menu_navs’); // not ok What’s wrong ?

Custom Taxonomy Archive not displaying entries

I have CPT ‘movie’, with the following taxonomies: genre, director, and actor. The code used to register these is this: I have an archive movie page working using the following code in archie-movie.php: <?php get_header(); ?> <div id=”middle” class=”clearfix”> <div id=”inner”> <div id=”content” class=”<?php echo $bw; ?>”> <?php get_template_part( ‘part-genrenav’); ?> <div id=”pageHead”> <?php […]

Changing editor-style.css style

I am using the following code in my function.php file to add a Format dropdown to the WordPress visual editor with just one option, Custom 1. <?php function custom_styles_button($buttons) { array_unshift($buttons, ‘styleselect’); return $buttons; } add_filter(‘mce_buttons_2’, ‘custom_styles_button’); function my_mce_before_init_insert_formats( $init_array ) { // Define the style_formats array $style_formats = array( // Each array child is […]

How the WordPress sidebar works

Ok, the title is surely not good to explain my very basic question, but here it is: I just started creating a wordpress theme and the index.php has two columns: 1.) The main content and 2.) A vertical column where I am showing other info like Archives, Recent posts all programatically. Updated Until now everything […]

Edit admin post page

I have to customize the admin page where you edit the other pages “wp-admin/post.php”. I have to add a lot of things, and delete others, change colors and add a custom menu to the top. I don’t know how to start searching for this. Are there any hooks, or funtions to change the HTML in […]

Search results ordered by custom post types are not grouped

For a WordPress website I have a couple of custom post types, named cities and books, and also the regular blog posts. I have customized the search results (only search in the post title) page so that the results are to be ordered by custom post type. The problem is that the search results within […]

PHP files included in functions.php don't seem to work

This is my first post on WordPress StackExchange, I’ll try to be precise. My question is: Is there anything in particular I should do to the files I’m including in my theme’s functions.php file? I’m creating a WordPress theme and my functions.php file is getting very big now. I managed to remove a lot of […]

Assigning the same custom meta box to multiple post types

I currently have videos set up as a custom post type and I have also created a custom meta box for it that allows users to enter the ID of either a youtube/vimeo video – the video is then displayed on the front end. I want to re-use this meta box for another custom post […]