mdailey77
Forum Replies Created
-
Forum: Plugins
In reply to: [CMB2] iframe not showing on frontend when using a CMB2 fieldI figured out what was the issue. I was putting the get_post_meta call through a wp_kses_post function in the page template. Thanks again for the help.
Forum: Plugins
In reply to: [CMB2] iframe not showing on frontend when using a CMB2 fieldHere is the test page link: http://extremedev.wpengine.com/no-sidebar-widgets-test-page/ The iframe is supposed to appear immediately after the text ‘Get the conversation started today!’
This is the iframe tag I’m testing:
<iframe id=”iframe” style=”border: none; margin-left:-10px” height=”650″ width=”350″ src=”http://learn.extremenetworks.com/test_form.html” scrolling=”no”></iframe>Here is the entire CMB2 configuration:
// Custom Text Field - Pages add_action('cmb2_admin_init', 'cmb_pages_customtext_metabox'); function cmb_pages_customtext_metabox() { $prefix = '_main_'; $cmb_pages_customtext = new_cmb2_box( array( 'id' => 'customtext', 'title' => esc_html__( 'Custom Text', 'defaulttheme' ), 'desc' => esc_html__( 'This will display in the right-hand sidebar', 'defaulttheme' ), 'object_types' => array( 'page' ), 'context' => 'normal', 'priority' => 'high', 'show_on' => array('key'=>'page-template', 'value'=>'template-page-nosidebarwidgets.php'), 'show_names' => true, // Show field names on the left )); $cmb_pages_customtext->add_field( array( 'name' => esc_html__( 'Title', 'defaulttheme' ), 'id' => $prefix . 'customtext_title', 'type' => 'text' )); $cmb_pages_customtext->add_field( array( 'name' => esc_html__( 'Content', 'defaulttheme' ), 'id' => $prefix . 'customtext_content', 'type' => 'wysiwyg', 'sanitization_cb' => false, )); }Thanks for your help.
- This reply was modified 8 years, 4 months ago by mdailey77.
Forum: Plugins
In reply to: [CMB2] iframe not showing on frontend when using a CMB2 fieldI added the code referenced in your link to my functions.php with no success.
Somewhere along the line the iframe tag is getting removed before it gets to the actual page. The iframe tag is getting saved to the database. Before I added sanitization_cb the iframe tag wasn’t getting saved in the database.
Forum: Fixing WordPress
In reply to: iframe not showing on frontend when using a CMB2 fieldOk will do. I wasn’t sure where to post. I thought it might just be a general sanitization issue.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] export file is corruptedI found a solution. I increased the WordPress memory limit to 512MB in wp-config.php and that fixed the saving issue. Thanks again for your help.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] export file is corruptedThanks for the response. I’m starting to think it is a problem with the memory/execution time limits on the server. Another issue I have encountered is the Media Library thumbnails don’t load. The loading image just keeps spinning.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] export file is corruptedHi. Thanks for getting back to me. The export works if I only select one file. If I select more than one file, no matter if its in JSON or CSV format, I can’t open the zip file. In the error logs on WPEngine there was this: [WPMUDEV API Error] 4.0.8 | cURL error 28: Operation timed out after 15001 milliseconds with 0 bytes received ((unknown URL) [500]) , referer: http://xxxxx.wpengine.com/wp-cron.php?doing_wp_cron=1509443433.4177670478820800781250. It appeared around the same time when I tried exporting the file.
- This reply was modified 8 years, 7 months ago by mdailey77.
Thank you for getting back to me. I’ll start doing some troubleshooting.
I found out the KBE_PAGE_TITLE is supposed to return the knowledgebase slug. I wanted to get the page title. The solution I found is to use the page id like this: <h1><?php echo get_the_title(14551); ?></h1>
Forum: Developing with WordPress
In reply to: Custom permalink for specific categoryI got the permalink function to work too. Here’s my complete working code for those in a similar situation. The ‘tribe_event_in_category’ function is a built-in function of the Events Calendar plugin.
add_filter( 'post_type_link', 'change_webinar_links', 10, 2 ); function change_webinar_links( $link, $post) { if ( $post->post_type == 'tribe_events' && tribe_event_in_category('webinar') ) { $link = trailingslashit( home_url('/webinars/' . $post->post_name ) ); } return $link; } add_action( 'init', 'webinar_rewrite_rule', 5); function webinar_rewrite_rule() { add_rewrite_rule( '^webinars/([^/]+)/?', 'index.php?tribe_events=$matches[1]&post_type=tribe_events&name=$matches[1]', 'top' ); }Thank you so much bcworkz for your help.
Forum: Developing with WordPress
In reply to: Custom permalink for specific categoryI got the rewrite function to work finally. I changed the priority from 20 to 5 and it worked, like so
add_action( 'init', 'webinar_rewrite_rule', 5);The function to change the permalinks still doesn’t work. Is it because I’m using the wrong hook (post_link)?
Forum: Developing with WordPress
In reply to: Custom permalink for specific categoryI changed my code to this but it still doesn’t work:
add_action( 'init', 'webinar_rewrite_rule', 20); function webinar_rewrite_rule() { add_rewrite_rule( '^webinars/([^/]+)/?', 'index.php?tribe_events=$matches[1]&post_type=tribe_events', 'top' ); }Is there something else I need to add? After I uploaded this code I did flush the rewrite rules by going to the Permalinks setting page and clicking on Save Changes without changing anything.
Forum: Plugins
In reply to: [The Events Calendar] Query all events with a specific categoryI found out I don’t need to query all events. I just need to query past events with a specific category. How would I do that?