657 reputation
514
bio website visztpeter.me
location
age
visits member for 3 years, 2 months
seen 20 hours ago

Jul
6
comment Posts to expire (deleted) after a date
How many coupons do you have? it should't be too slow, since its only going to run once a day.
Jul
6
comment Populate custom field on publish or update
in your theme's functions.php file
Jul
6
comment Posts to expire (deleted) after a date
Oh boy...:) You need some experience with WordPress to do something like this. But the code goes inside your theme's function.php file or create a plugin for it. How and where do you registered the coupon post type for the Coupons?
Jul
6
comment Posts to expire (deleted) after a date
The 3 example you showed in the question will work with strtotime, but its not fool-proof. The problem is that 01/12/2014 could be december 1. or january 12, nobody knows 100% sure.
Jul
6
comment Custom widget not appearing on front end
Also, looks like the widget appears on the other pages on the site, correct?
Jul
6
comment Custom widget not appearing on front end
First, theres a html syntax error with this, the widget that will be generated is inside a div, and you're trying to display the widget inside a paragraph tag, which is not going to work properly. In short, a paragraph element may not contain other block elements. So change <p class="opening-hours"> to <div class="opening-hours">
May
15
comment Dump contents of a variable inside a filter/hook callback that runs during save post
The filter probably runs in the background, so if you don't stop the function using die(), the var_dump still works, you just can't see it.
May
15
comment Getting page ID inside loop
Use a regular include instead of the get_template_part: include(locate_template('content-custom.php')); This way the variables are passed, so you can re-use them in your template.
May
15
comment Custom user fields validation on registration
The ajax_register_form() function is only hooked to an ajax-request, so the form data is not processed with a regular submit, only if the ajax works. I would suggest you to fix the ajax form submission first, or else you need to edit the ajax_register_form function to work with regular forms which would take more effort to do in my opinion. You can test it by changing the first add_action( 'wp_ajax_nopriv_ajax_register_form'... line to add_action( 'init'..., this will submit your form properly, but make sure you have a conditional logic in your function so it won't run always
May
15
comment Getting page ID inside loop
Simply define a variable outside your custom loop for your current post id that you can re-use later
May
12
comment Change id=“respond” to the comments container
I don't see any filter to change this, so i think the easiest solution is to wrap your comment_form() function in a div with a specific id. <div id="respond-1"><?php comment_form(); ?></div>
May
2
comment Get Tag Slugs that start with a word
Check the updated answer for a solution that works better when you have lots of tags
May
1
comment wordpress option page data from select form is not saving to database
Are you sure its not saved correctly? Try print_r on the $options variable.Maybe the selected() function is not working properly.
Apr
11
comment Open first link in subnavigation when clicking top navigation
Simply add the Pizza sub navigation as the main menu item and rename it to Food
Apr
11
comment (solved) how to have the gallery shortcode output one single UL list instead of several DL?
It will generate 2 list item / image(2 li element), not creating an ul for each image.
Apr
7
comment Get wp-load.php PATH with wp_localize_script and JavaScript for plugin
When you're viewing your site, its already loaded, otherwise nothing will work. What exactly are you trying to do?
Apr
7
comment Update meta values with AJAX
To be honest, i'm not sure what you mean by this, but if this is necessary, you need to pass the current post id too, not just the $vote_id in the ajax request, because the global $post variable is not in the wp_ajax function.
Apr
7
comment How to add featured thumbnail into import XML?
Its the other way around. You can export the media in a separate xml file, and the media is attached to the post, not the post to the image.
Mar
24
comment Highlight only current on single pages
li.current-menu-item li a {color:red;}
Mar
24
comment Highlight only current on single pages
why not highlight them using CSS?