Keep Pagination in Tabs

Use the following extension to the WP_Query class. The extension only takes your arguments as an array, rather than a string format. You’ll to add individual values for “page_link” for each of your tabs. This should just be a string (“tab1”, “tab2” etc etc) Then you’ll need to use the $my_query->next() and $my_query->prev() to add … Read more

Generate a tabbed submenu — from taxonomy term or submenu item — with sample content

I ended up solving this problem with Ubermenu. What I wanted to write was complex enough that it made more sense to get a tested, commercial plugin that had the features I need. MaxMegaMenu didn’t do tabbed content but Ubermenu does. I’m able to construct menus like this: Taxonomy1 [Tabs] [DynamicTerms] [Dynamic Posts] Taxonomy2 [Tabs] … Read more

What is $tab in `install_plugins_{$tab}` hook?

If you go to the plugin-install.php inside the WordPress dashboard, there may be many tabs: wp-admin/plugin-install.php?tab=featured wp-admin/plugin-install.php?tab=popular wp-admin/plugin-install.php?tab=recommended … Here is the function you referenced: File: wp-admin/plugin-install.php 145: /** 146: * Fires after the plugins list table in each tab of the Install Plugins screen. 147: * 148: * The dynamic portion of the action … Read more

Using tabs in admin widgets [closed]

The problem is that you’re not using unique IDs (#tabs, #tabs-1 …), because widgets have multiple instances (the same IDs are used by the instance form the “Available Widgets” area). So just prepend or append the widget instance ID to your identifiers to make them unique: … <div id=”tabs-<?php echo $this->id; ?>”> <ul> <li><a href=”#tabs-<?php … Read more

Don’t display html if custom field is empty

I have no experience with WP UI, but the following code might do the trick: <!– Videos Tab –> <h3 class=”wp-tab-title”>Videos</h3> <?php if (get_field(‘videos’) && get_field(‘videos’) != “”) { ?> <div class=”wp-tab-content”> <?php the_field(‘videos’); ?> </div><!– Close Videos –> <?php } ?>

Create Post tabs in single-{content-type}.php with Custom Field values

You can use rewrite endpoints to achieve this. First, register your endpoints: function wpa_movie_endpoints() { add_rewrite_endpoint( ‘synopsis’, EP_PERMALINK ); add_rewrite_endpoint( ‘screens’, EP_PERMALINK ); add_rewrite_endpoint( ‘trailer’, EP_PERMALINK ); } add_action( ‘init’, ‘wpa_movie_endpoints’ ); So now in addition to http://domain.com/post-name/ (or whatever your particular permalink structure is), you’ll have: http://domain.com/post-name/synopsis/ http://domain.com/post-name/screens/ http://domain.com/post-name/trailer/ You can then check for … Read more

Rename Buddypress Profile Tab

Look at the source, you know that already. 🙂 I didn’t but I bet there is a piece of code looking like this: _e( ‘Activity’, ‘buddypress’ ); … or … __( ‘Activity’, ‘buddypress’ ); Follow the functions, they are wrappers for the function translate() in wp-includes/l10n.php: /** * Retrieves the translation of $text. If there … Read more

How can I run shortcode after click with ajax

You should try to replace the following jQuery part: action: ‘process_shortcode_on_tab_click’ with this one: action: ‘process_shortcode_on_tab_click_action’ to match your wp_ajax_process_shortcode_on_tab_click_action and wp_ajax_nopriv_process_shortcode_on_tab_click_action actions. Check for example the Codex on how to name the custom wp_ajax_$youraction hook.

custom tabs in media uploader

found it. in the automattic SVN for media.php i found the media_upload_header() function, and the only thing left to do is to echo it in the last function: function media_upload_ell_gmap_form() { echo media_upload_header(); ?> <h2>HTML Form</h2> <?php } that’s it.

Remove tabs from media uploader for a CPT

You can use the media_upload_tabs filter check for your post type and unset any tab you don’t want ex: function remove_media_library_tab($tabs) { if (isset($_REQUEST[‘post_id’])) { $post_type = get_post_type($_REQUEST[‘post_id’]); if (‘premium’ == $post_type) unset($tabs[‘library’]); unset($tabs[‘type_url’]); } return $tabs; } add_filter(‘media_upload_tabs’, ‘remove_media_library_tab’);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)