Allow tags and attributes in post and pages content
Looks like it is a privilege thing: Adding those tags as an admin works, while with other users having less privileges (editor, etc) does not.
Looks like it is a privilege thing: Adding those tags as an admin works, while with other users having less privileges (editor, etc) does not.
Cant use php fopen() function in functions.php
You are misusing shortcode_atts(). You need to pass the shortcode an array of defaults in the first argument, which you have done. Then you need to pass the user supplied arguments in the second argument, which you haven’t done. Your shortcode callback uses $params yet for some reason you are passing $atts, which is not … Read more
The function is hooked to an action, so you should be able to remove it. remove_action(‘admin_notices’,’default_password_nag’); You can then add back a function of your own choosing. Rename your function to something that won’t conflict with the Core function name and… add_action(‘admin_notices’,’my_password_nag’); You will need to create a plugin or mu-plugin to do it, but … Read more
Have you tried this: <?php add_action( ‘template_redirect’, ‘wp138320_template_redirect’ ); function wp138320_template_redirect() { if ( ! current_user_can( ‘manage_options’ ) ) { include( get_template_directory() . ‘/holding.php’ ); exit; } } ?> I’m currently working on a site that has issues with hooking into actions/filters like that too, changing it to something like the code above did the … Read more
You dan do this in the pre_get_posts hook. You can find a few examples on that page too 🙂
Ok, removed my first answer, that is why it is important to give as much info in your question as possible. You cannot copy functions from your parent theme to your child theme. You also cannot coipy the parent themes functions.php to your child theme The only time you can keep the same function name … Read more
Highlight only current on single pages
You simply need to query your custom fields and return them with your shortcode: // EXAMPLE USAGE: // [loop the_query=”showposts=100&post_type=page&post_parent=453″] function custom_query_shortcode($atts) { // Defaults extract(shortcode_atts(array( “the_query” => ” ), $atts)); // de-funkify query $the_query = preg_replace(‘~�*([0-9a-f]+);~ei’, ‘chr(hexdec(“\\1″))’, $the_query); $the_query = preg_replace(‘~�*([0-9]+);~e’, ‘chr(\\1)’, $the_query); // query is made query_posts($the_query); // Reset and setup variables $output=””; … Read more
Going to close this and answer myself. Apparently, there is something wrong with the way that GFFormsModel::update_lead_field_value truncates fields. I was unable to get this to work. Instead – I opted to use a direct WP insert (with if elseif etc…) – like so : $csql = $wpdb->insert(“wp_rg_lead_detail”, array(“id” => NULL,”lead_id” => $lead,”form_id” => $form,”field_number” … Read more