Tag Info

New answers tagged

0

admin_url() should be used. However for some websites this request gives error 404 in front-end admin_url('wp-admin/admin-ajax.php') should point to an actual file (admin-ajax.php), as such WordPress won't pass it through index.php, and so it shouldn't lead to the theme's 404 page. (Unless the file has been deleted). ... unless you have a .htaccess ...


0

I would agree to the comment by Howdy_McGee to use Custom Fields. A nice implementation would be possible with add_meta_box(). 1. Approach: The body_class Filter So for example, you could let him enter a custom field 'color-scheme'. In the next step, you could simply hook into the 'body_class'-filter and add another class to the <body>-tag ...


0

You don't specify the difference in details, but I would guess the two themes aren't any, or at least much, different outside of color scheme. My approach would be simply to implement one (or both) color schemes as secondary CSS stylesheets to enqueue conditionally and stick with same theme for both of them.


0

After two days looking for the solution and fighting with the code, I found the solution: As I suspected, the problem was reading the file ($image_data = file_get_contents($image);). The first error was not included in the form enctype =" multipart / form-data " to send files and data simultaneously. The second error was that images are not loaded by ...


0

WP_Query is your answer for the first question, you will need to create a custom search form, and parse that data, in order to create your custom WP_Query. Here is a link with a tutorial to get you in the right direction. For the PDF part, I beleive it will be easier to tell the users to use Chrome and use the Print to PDF function, and create an stylesheet ...


0

Here is the hard core coding for the simple answer. Use this code to attach a video to the post. I have given a static $listing_post_id post id equal to 7. You can use dynamical post id here. Other wise code is working and tested. Validation is not done here you can do it as you wish. <?php if (isset($_POST['uploadvideo'])) { if ( ! function_exists( ...


0

WordPress handles login failed in two ways: If it is a bad credential, and both username and password have a value, then this action can be captured by wp_login_failed If both, or one, of the options are empty, then WordPress generates the error object as the first parameter in the authenticate filter; it does not open and wp_login_failed action captures ...


-2

function djg_authenticate_login( $user ) { $referrer = $_SERVER['HTTP_REFERER']; $error = false; if($_POST['log'] == '' || $_POST['pwd'] == '') { $error = true; } if ( !empty($referrer) && !strstr($referrer,'wp-login') && !strstr($referrer,'wp-admin') && $error ) { if ( !strstr($referrer, '?result=failed') ) { ...



Top 50 recent answers are included