iuttu
Forum Replies Created
-
Forum: Plugins
In reply to: [Conditional Widgets] WPMLI’ve solved it adding this code to logic.php line #96:
array_walk( $arr_pages, function (&$element) { $element = apply_filters('wpml_object_id', $element, 'page'); } );
Forum: Fixing WordPress
In reply to: Admin bar only shown at home page after 4.7.2 upgradeSome extra info… I’ve added a wp_get_current_user() check in functions file. After login, when I visit frontend, user info appears in homepage, but not info appears in the rest of pages. Really weird =(
Forum: Plugins
In reply to: [Contact Form 7] before send mail function not getting calledSame problem here. Any way to fix it? I cannot modify WPCF7_Form inside the hook =(
Forum: Hacks
In reply to: CPT shared urlYes… “internal events” has a lot of information (really A LOT). External has just date, place and category =/
Thank you very much bcworkz ??
Forum: Hacks
In reply to: CPT shared urlWP templates are loaded based on queried elements. If you have this rule:
– /agenda/([^/]+) => index.php?even=$matches[1]/agenda/example url will try to load single-event.php template (if event “example” is found). If single-event.php doesn’t exists, it’ll try single.php. If single.php bla bla bla…
I could use the same CPT and select a template for each type, yes. But this two event types are so so different (type 1 has 200 fields and type 2 has 3) that I think it’s not a good idea to use the same CPT.
Forum: Hacks
In reply to: insert data from wordpress into different tableYou can use WP_Query to query WP database and use “normal” PHP functions to insert desired data on your own database.
Forum: Hacks
In reply to: Shortcode attribute to display post from the last 24 hoursYou can do it with a “posts_where” filter. Add a filter just before your query and remove it just after. Inside your filter, alter the condition using post_date and current date to take just posts published in the last 24 hours.
It’s not a good idea to use query_posts if you don’t want to alter main query. You could use get_posts or directly WP_Query ??
Forum: Hacks
In reply to: Internationalization for local variables in foreach loopI think you just need to localize “This is my text %s” and each value separately. If values in loop are “AAA”, “BBB” and “CCC” you must localize:
– This is my text %s
– AAA
– BBB
– CCCIn spanish you can translate:
– Este es mi texto %s
– AAA-es
– BBB-es
– CCC-esOutput will be “Este es mi texto AAA-es”, “Este es mi texto BBB-es”, etc…
I don’t know if this is a solution for you. If it’s not, could you be more specific?
Same problem here. Anyone has found a solution?
Forum: Plugins
In reply to: [Contact Form 7] change color of green box upon sendStyles in the plugin overwrite yours. You have two options:
1) Add !important to the css rule
2) Disable completely CF7 styles adding define(‘WPCF7_LOAD_CSS’, false); in your wp-config.php file and style the form yourself.// spanish //
Lo haces bien. Lo que ocurre es que los estilos del plugin machacan los tuyos. Tienes dos opciones:
1) A?adir un !important a la regla
2) Deshabilitar por completo los estilos de CF7 a?adiendo define(‘WPCF7_LOAD_CSS’, false); a tu fichero wp-config.php (en la raíz de la instalación)Forum: Plugins
In reply to: [Contact Form 7] HTML in successful submission messageEdit functions.php in your theme and just add it.
Forum: Plugins
In reply to: [Contact Form 7] HTML in successful submission messageWe had the same problem with HTML responses. We solved it with this code:
if(!function_exists('iuttu_wpcf7_form_response_output_filter')){ function iuttu_wpcf7_form_response_output_filter($output, $class, $content, $this){ return '<div class="' . $class . ' ">' . $content . '</div>'; } add_filter( 'wpcf7_form_response_output', 'iuttu_wpcf7_form_response_output_filter', 10, 4); }