Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Masking the wordpress directories?

Featured Replies

Hello, hello.

 

I've picked up some code from the web to put in my functions file.

 

It's from a reputable source (hongkiat.com) but I can't get it to work, can any one tell why this doesn't work?

 

 

 

add_action('generate_rewrite_rules', 'themes_dir_add_rewrites');  
 
function themes_dir_add_rewrites() {  
  $theme_name = next(explode('/themes/', get_stylesheet_directory()));  
 
  global $wp_rewrite;  
  $new_non_wp_rules = array(  
    'css/(.*)'       => 'wp-content/themes/'. $theme_name . '/css/$1',  
    'js/(.*)'        => 'wp-content/themes/'. $theme_name . '/js/$1',  
    'images/wordpress-urls-rewrite/(.*)'    => 'wp-content/themes/'. $theme_name . '/images/wordpress-urls-rewrite/$1',  
  );  
  $wp_rewrite->non_wp_rules += $new_non_wp_rules;  
}
 

Edited by Lyndsey
placed code tags around code

Doesn't Wordpress have a configuration setting for your file directories? Most CMS's allow you to configure upload destinations somehow...

Edited by BlueDreamer

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.