Tag Info

New answers tagged

2

WordPress doesn't have built-in features for a site that is served in multiple languages. Yes WordPress has features for translating the UI labels into different languages, but not for the actual content. You are going to need to use a plugin that basically keeps multiple versions of each Post for each language and has means for the user to select the ...


0

I don't have enough reputation to reply to comment on your answer, so I will post it here: I had similar problem, and answer why class selector works (and id don't) is because on widgets page, that element appears twice (on left side to select it and drag to the right), and on the right side, in appropriate sidebar area. So, that element and everything in it ...


1

Please refer below : function disable_new_posts() { // Hide sidebar link global $submenu; unset($submenu['edit.php?post_type=CUSTOM_POST_TYPE'][10]); // Hide link on listing page if (isset($_GET['post_type']) && $_GET['post_type'] == 'CUSTOM_POST_TYPE') { echo '<style type="text/css"> #favorite-actions, .add-new-h2, .tablenav { ...


0

The GravityForms plugin renames the top level menu item to match the first of the sub-menu. For example; if you've added just the gravityforms_view_entries capability to the Editor role, then the first sub-menu item will be "Entries", so the parent menu will be "gf_entries" not "gf_edit_forms". So, the following code will remove the "Help" item from the ...


0

Try to add a .htaccess file in the root of your site (where the "wp-content" folder exists) The default .htaccess: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END ...


0

This was solved. To close the question, I'll put Robert's answer here: He suggested I move the .htaccess file. This wasn't a problem for me. The problem was the permalink structure. I changed it to the default one and then back again to my permalink setting. It worked. Thanks!


1

The problem lies in the attachment-filter= URL parameter. The slash between application/pdf (or else) is being escaped twice. When you replace the %252F with a slash or %2F the filter will work. The first escaping (/ becomes %2F) happens when WP is building the selectbox containing the mime types. The second one (%2F becomes %252F) is performed by the ...


0

is your site working? or problem it's just with admin? try to review apache access & error logs for possible clues. Try also to review htaccess, bad rewrite could break your site


0

user_new_form is the hook that do can do the magic here. function custom_user_profile_fields($user){ ?> <h3>Extra profile information</h3> <table class="form-table"> <tr> <th><label for="company">Company Name</label></th> <td> <input ...


0

I accomplished this by first hooking into the 'current_screen' action and making a determination if my post_type was set, then adding the filter. There may be a shorter way but this works if you need to change the text only on a given post type. public function set_featured_image_filter(){ $screen = get_current_screen(); if( ...


0

In the end i went ahead and changed all my code according to several examples i found across the web. p.s i came to the conclusion my code is ok but isnt suitable for the accepted structered that needs to be used for ajax inside wp-admin. In any case... Here is a version that works. in the hope this might helps someone The JS ...


2

To change the mode URL variable but in the load try this: add_action( 'load-edit.php', 'my_default_posts_list_mode' ); function my_default_posts_list_mode() { $post_type = isset( $_GET['post_type'] ) ? $_GET['post_type'] : ''; if ( $post_type && $post_type == 'my_post_type' && !isset( $_REQUEST['mode'] ) ) $_REQUEST['mode'] ...


1

If u do not want to hack a lot into function.php of your wordpress, I would like to suggest you use: Admin Menu Editor PLUGIN, Lets you directly edit the WordPress admin menu. You can re-order, hide or rename existing menus, add custom menus and more. which works great for me. But anyway if u want to hack using if-else to display diffent contents can ...


0

You don't say if is a multisite installation or two separate stand-alone ones. I'm going to suppose it isn't multisite because if so, the answer is trivial. In the other case, there isn't any problem. You have to configure ssl as usual in your apache vhost or nginx for each domain with your wilcard certificate. Aditionally, you can use the Wordpress HTTPS ...


0

Setting up MultiSite in one main domain, that you have SSL, and then use the other domain as custom sunrise domain settings. You have to setup the .htaccess or vhost(for NGiNX) though. But both site will need to have almost same type domain or plugin. Its one way. Other will be a bit complex one. I would setup two separate WordPress in two separate ...


2

"Admin Stickies" for custom post types: To support sticky custom posts in the backend, you can use the following code snippet in your functions.php file in the current theme directory or in your custom plugin: /** * Set admin stickies for the 'foodmenu' custom post type */ add_action( 'init', function() { if( function_exists( 'wpse_cpt_stickies' ) ) ...


0

To enable the Network Setup menu item, you must first define multisite in the wp-config.php file. Open up wp-config.php and add this line above where it says /* That's all, stop editing! Happy blogging. */. If it doesn't say that anywhere, then add the line somewhere above the first line that begins with require or include: /* Multisite */ define( ...


0

Well the good news is I found the answer, the bad news is the answer is so lame. Apparently I have some ACF Field export files with multiple field groups each wrapped in their own <?php ?> wrapper. Well there was a line break between the two like so: ?> <?php And that was enough to break every thing. Lame right? So if you come across this ...


0

forget about using wp_editor on such scenario.. instead use the core tinymce, something like; tinymce.init({ //selector: 'customEditor-' + nextPlusSignId, editor_selector: 'nwac_editor_' + nextPlusSignId, mode: "specific_textareas", media_buttons: false, menubar: false, content_css: ...


-1

Try this in your functions.php file: //fix for cookie error while login. setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN); if ( SITECOOKIEPATH != COOKIEPATH ) setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);


1

I've been struggling with the same problem...when args[0] is publish, args[2] is not populated. You have to get it from the url. if(substr($args[0],0,7)=="publish"){ $postid=$_GET["post"]; if(!isset($postid))return $allcaps; } else $postid=$args[2];


0

I'm sure there is another way to fix it, but you could always try to do a fresh install. Make sure you backup your database and theme files, of course, and then just drop them into the new install. Not the most eloquent solution, but it has worked for me in the past when I couldn't think of another way.



Top 50 recent answers are included