Hot answers tagged customization
6
Our journey starts here with the WP_Customize_Background_Image_Control class, which is a WP_Customize_Image_Control.
I'd imagine offering these built-in backgrounds in a new tab alongside the existing Upload New and Uploaded tabs. There are at least two ways of achieving the following: either creating your own modified class based off of the ...
4
Assuming you'd like the facility to update this data from the quickedit box whilst viewing the list of comments, you'll need a series of actions and filters. I've tried to make appropriate comments in the necessary places for you, though bear in mind i threw this all together for you with a small amount of testing(it does work though).
This should get give ...
3
Hm, first of all your page template has to be inside your current theme folder: /wp-content/themes/current-theme/ or in a similar folder. Check the Codex (Page Templates #File Folders) to make sure your template is in the right folder.
While looking at the Codex also check the Selecting a Page Template section above if you did everything the right way. Your ...
2
I am not sure there is a way to suppress all these links, but you can hide them with CSS:
add_action( 'login_head', 'hide_login_nav' );
function hide_login_nav()
{
?><style>#nav,#backtoblog{display:none}</style><?php
}
Result:
1
If the Categories referred to here are the WordPress native category taxonomy, the queries for these term pages by default will only include the native post post type.
To add custom post types to category term queries, you can add a bit of code to your theme's functions.php file, which modifies these queries via the pre_get_posts action to add your custom ...
1
The problem is problably here:
<form id="oselector" method="GET" action="<?php the_permalink(); ?>">
Your code is not in the WordPress Loop. According to the Function Reference (emphasis added):
the_permalink() - Displays the URL for the permalink to the post currently being processed in The Loop. This tag must be within The Loop, and is ...
1
What you want to do in this case is to use a meta_query in WP_Query like the following. You can reference the following Codex for more information https://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters. Once you have the posts. Loop over them and add their date as data attribute, and filter the items using data attributes.
$args = ...
1
Simply check (in the loop): $loop->current_post:
1 == $loop->current_post
AND printf(
'<img src="/scripts/timthumb.php?src=%s&h=90&w=70&zc=1" alt="%s" />'
,the_field( 'img_actor' )
,get_the_title()
);
You just have to change the Advanced Custom Fields API function to whatever outputs ...
1
delete_post fires when the post is deleted permanently, not when it is trashed. I don't know if that is relevant but keep that in mind. That is the only real WordPress specific part of this question. The rest is bad PHP.
Variables do not expand inside single quotes. You are a sending a query to the database that literally looks like
SELECT `id` FROM ...
1
There are two mechanisms in WordPress that would fit your use case: custom taxonomies and post metadata.
Since you have already determined that you want something close to mechanics to categories/tags (which are built-in taxonomies) it seems like custom taxonomy is a right fit for your use case.
See register_taxonomy() documentation on creating it.
1
Modify the searchform.php, or create one in a child theme (recommended), and you should be able to modify the form all you want.
This is the file that get_search_form looks for and is the file used by the default search widget, though it is not listed in the Template Hierarchy.
Reference:
http://codex.wordpress.org/Function_Reference/get_search_form
1
If someone has a better solution, I'm open to it, however, what I came up with seems to work fine.
Basically the following code is just waiting for the image to finish uploading and then hooking into the add_attachment action. Once the first is added, we hook in and then generate the new images via the post ID (for the image attachment) which is the only ...
1
Have a look in the source:
http://core.trac.wordpress.org/browser/trunk/wp-includes/class-wp-customize-control.php
Basic control types:
text
checkbox
radio
select
dropdown-pages
Also some advanced control types (as-described by Otto):
WP_Customize_Color_Control - extends the built in WP_Customize_Control class. It adds the color wheel jazz to places ...
1
I don't have comment capabilities, but the problem is very likely to be on the MS server side, specifically the URL Rewrite module. This is what handles permalinks on IIS. There is a hotfix for this problem, but you should probably apply all the hotfixes available for your system.
Only top voted, non community-wiki answers of a minimum length are eligible
