Highlight only current on single pages
Highlight only current on single pages
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
java script error Uncaught SyntaxError: Unexpected token ILLEGAL
Init hook for header send
What you have is mostly just PHP errors. First, dashes are not valid characters in variable names, so are going to have trouble with this– badge-id-$badge_ID— no matter what. You should be using underscores instead. Second, you need to construct the entire object variable string beforehand, rather than try to construct it as you are … Read more
I wonder if this would work: [tabs tab1=”Tab 1″ tab2=”Tab 2″ tab3=”Tab 3″] [tab id=”1″]Content for tab one goes here.[/tab] [tab id=”2″]]Content for tab two goes here.[/tab] [tab id=”3″]]Content for tab three goes here.[/tab] [/tabs] You should also check if the shortcode definitions exists: add_shortcode( ‘tabs’, ‘some_function_for_tabs’ ); add_shortcode( ‘tab’, ‘some_function_for_tab’ );
Option 2 was the only one that worked correctly. function disable_mce_buttons($settings){ $settings[‘external_plugins’] = ”; $settings[‘toolbar3’] = ”; return $settings; } add_filter(‘tiny_mce_before_init’, ‘disable_mce_buttons’);
It’s returning just 1 post title because everytime it reads a post it replaces the content of the var $titles with the title of the current post. Try this, it will return an array with the post titles. function getctas() { $titles_array = array(); switch_to_blog(1); $args = array( ‘post_type’ => ‘location_icons’ ); $ctas = new … Read more
The content you input via editor is saved as such, there would be no straightforward way to untangle styles from it and output it in the head of the page. Doable, but far form convenient. You might want to look into adding extra input for such elements to post editor, save data in custom field, … Read more