Kerzzy
Forum Replies Created
-
Forum: Plugins
In reply to: [Polylang] [Improvement] Language switcher as drop-down menuPerfect, thanks for your answer ^^
Forum: Networking WordPress
In reply to: Subdomains that have almost same content as the domainHi ekingstad,
Wherever you need it in your theme (in PHP), see Page Templates, or like explained in the example before, in functions.php with hooks :
$sub = array_shift((explode(".",$_SERVER['HTTP_HOST']))); // Global var /** * Function to change the menu according to the subdomain */ add_filter( 'wp_nav_menu_args', 'my_primary_menu_args' ); function my_primary_menu_args( $args ) { global $sub; if($sub == 'www') $args['menu'] = 'Main menu'; // Created in Appearance > Menus else $args['menu'] = 'Secondary menu'; } return $args; }
Regards,
KerzzyForum: Plugins
In reply to: [Download Manager] Invalid file typeThat’s not good for me but I’ll deal with it. Thanks
Forum: Plugins
In reply to: [Download Manager] Download Link shortcodeOh, perfect. I didn’t find it anywhere, thank you ^^
Forum: Plugins
In reply to: [Category Posts Widget] Hide widget if empty categoryHi,
It works perfectly, and I think next time you can, that way, show all the categories in the Category list, with this existent option. Showing a text can be very useful for a lot of people too, in my opinion. Thank you very much, good job ! ^^Forum: Plugins
In reply to: [Download Manager] Download Link shortcodeI found a solution for the moment – creating a shortcode in functions.php.
function ji_func_download($atts) { extract( shortcode_atts( array( 'id' => '', 'name' => '' ), $atts) ); $htmlcode = '<a href="'.HOME_URL().'/?wpdmdl='.$id.'">'.$name.'</a>'; return $htmlcode; } add_shortcode( 'ji_download', 'ji_func_download' );
Then, I use
[ji_download id="100" name="Member list.pdf"]
in a page/post instead of[wpdm_package id='100']
.Forum: Plugins
In reply to: [Download Manager] Download Link shortcodeYeah I hope so..
Forum: Plugins
In reply to: [Download Manager] Download Link shortcodeIt works, but it isn’t a good idea to edit directly the plugin code, for updates..
Forum: Plugins
In reply to: [Download Manager] Download Link shortcodeI totally agree.
Is that possible to get only the link ?Forum: Plugins
In reply to: [Simple Download Monitor] Restrict downloads to users logged in?I don’t think it’s about membership. The idea is that the download file can only be accessed by logged-in users. Now there is an option, protect the file by password, but that’s more complicated if we just want to restrict file for the connected users. Afterall, if someone tries to access to a file reserved for users, then it will redirect to a specific page (i.e. Home, Log-in page or Error 404).
That could be a big improvement, but very useful for a lot of users I think.Forum: Plugins
In reply to: [Dynamic Widgets] Interesting but not functionalYeah, I searched and I found that the plugin doesn’t work with Category Posts Widget (I always miss the fact that plugins working together is anarchy). My fault, but it’s too bad..
I found that depreciated functions sill exist, so it’s from your plugin.
Thanks for your answer ^^Best Regards,
KerzzyForum: Networking WordPress
In reply to: Subdomains that have almost same content as the domainHi builtbypeter,
you simply need to use it like this (example for a different logo in each sub/domain) :$subdomain = array_shift((explode(".", $_SERVER['HTTP_HOST']))); if($subdomain == 'sub1'){ // https://sub1.domain.com/ $image_url = '/img/logo1.png'; }elseif($subdomain == 'sub2'){ $image_url = '/img/logo2.png'; }elseif($subdomain == 'domain'){ // https://domain.com/ $image_url = '/img/main-logo.png'; } echo '<img src="'.$image_url.'" alt="Logo" />;'
And you use it in your templates, or in functions.php using hooks.
I hope it answered your question ^^
Best regards,
KerzzyForum: Plugins
In reply to: [Category Posts Widget] Hide widget if empty categoryHi,
Thanks very much, that’s fantastic ! (:
Best regards
Forum: Plugins
In reply to: [Download Monitor] Download URL -> Page not foundHi,
Thanks for your support.
I tried with each plugin (in a default theme), and it seems that the Polylang plugin causes the error.. Is there anything I can do ?And you’re welcome for the quick edit
Best regards,
KerzzyForum: Plugins
In reply to: [Category Posts Widget] Hide widget if empty categoryHi,
This may be a good idea, for example “Sorry there is not posts to show” or something like this.. Or simply a textbox where the user can write its own text when the category is empty, or a checkbox to hide the widget..The idea is that the user doesn’t have to modify the widgets, he’ll just create/modify/delete its articles (:
It could be great, thanks !