Jack
Forum Replies Created
-
Forum: Networking WordPress
In reply to: WordPress MultisiteOff topic, but @nnikolov, your gravar picture is awesome when you give the right answer on only one line. I lol’d
Take a look at WordPress’ built in functions that can achieve this for you:
https://developer.www.ads-software.com/reference/functions/add_image_size/
Forum: Fixing WordPress
In reply to: just the background imagesite-header and site-footer are either classes or IDs
So you need a target in the css like
`
.page-id-1815 .site-header,
.page-id-1815 .site-footer {
display: none;
}
`Your code is missing the period ” . ” To target the classes correctly.
- This reply was modified 7 years, 9 months ago by Jack.
Forum: Fixing WordPress
In reply to: website without WWW redirecting to domain.com/wp-adminIt shows right for me now on chrome. Did you flush your cache / DNS?
Forum: Developing with WordPress
In reply to: Alternative to wp_tag_cloudIt seems the function doesn’t include a limit parameter. Most people are using a custom filter in functions.php. See a solution here:
https://mekshq.com/limit-number-of-tags-in-wordpress-tag-cloud-widget/
Forum: Fixing WordPress
In reply to: website without WWW redirecting to domain.com/wp-adminDid you use a plugin for setting up your SSL? Or did you write custom rules in your .htaccess file?
Forum: Developing with WordPress
In reply to: Function Array CSV AttachmentHello,
I do recommend putting this code as a gist for other people in this forum. The lines are so long that you have to scroll right a lot.
https://gist.github.com/Just looking at your code and its format, I see maybe one issue with the format of your fputcsv() function at the top. I don’t think you need to loop through all values in the second parameter “$row”. The function is already expecting the values to come in as an array. Take a look at the function’s documentation.
Thus you may want to try removing the foreach loop and directly use $array_data as the second parameter (assuming it is sanitized for security).
Side note: In my experience, PHP’s read and write functions like fputcsv() are notorious for passing and making the file even if it doesn’t have/see the information that it needs. Thus, be sure to turn on error logging and check the logs.
Your code would look more like:
// foreach($array_data as $row) { // loop commented out/not needed fputcsv($output, $array_data, ',', '"'); // }
- This reply was modified 7 years, 10 months ago by Jack.
Forum: Networking WordPress
In reply to: What comment system to use with WordPressHowdy and happy weekend,
Do you not like WordPress’ built in comment system? Is there a reason you don’t consider it?
- This reply was modified 7 years, 10 months ago by Jack.
Forum: Developing with WordPress
In reply to: Custom post type and check for user permissionInstead of using the $_POST vars, you should consider using WordPress’ built in functions that check the post type.
– https://developer.www.ads-software.com/reference/functions/get_post_type/
– https://codex.www.ads-software.com/Function_Reference/is_singular
– https://codex.www.ads-software.com/Conditional_Tags#A_Post_TypeSo the check would look more like:
if( get_post_type() == 'event' ) { [...rest of your code..] }
Forum: Fixing WordPress
In reply to: Can’t save a menu containing a linkA few questions for clarity. Is this a custom menu that you’ve registered? How are you adding and formatting the link in the menu manager?
Forum: Fixing WordPress
In reply to: How to customise pluginsThe ideal way would be to use the hooks that the plugin provides. These would let you add your own logic in functions.php without being deleted with an update.
Forum: Fixing WordPress
In reply to: CSS questionForum: Fixing WordPress
In reply to: Constant Missed ScheduleForum: Fixing WordPress
In reply to: Different roles and access to specific pagesThis is a fairly standard feature in most membership plugins. I use S2member a lot, but that may be overkill for you. You may want to browse around for lighter weight ones that don’t require a lot of configuration.
Forum: Fixing WordPress
In reply to: Different roles and access to specific pagesThis would have to be coded in PHP without plugins.
WordPress has an extensive user roles api:
https://codex.www.ads-software.com/Roles_and_CapabilitiesThis would let you redirect or block access to certain pages based on user roles. Your PHP would run checks against each user role and take users to the right place after logging in.
Otherwise, a lot of plugins already do this.
- This reply was modified 7 years, 10 months ago by Jack.