Edward Caissie
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to display user role in postNo worries; glad to help. Besides, I was looking for a little snippet to write up a post for; this will work just fine (*grin*)
Forum: Fixing WordPress
In reply to: How to display user role in postThe snippet above works fine for me on my test sites. I simply pasted it inside “the_Loop” and it did display the role as appropriate for the post author.
Perhaps it is how you are implementing the code? Can you provide a link to a gist or pastebin of the code showing how you are using it?
Forum: Fixing WordPress
In reply to: How to display user role in postOK, it may be a little less involved than I first thought. Try this snippet in your
single.phptemplate:global $post; if ( user_can( $post->post_author, 'administrator' ) ) { echo 'Administrator'; } elseif ( user_can( $post->post_author, 'editor' ) ) { echo 'Editor'; } elseif ( user_can( $post->post_author, 'author' ) ) { echo 'Author'; } elseif ( user_can( $post->post_author, 'contributor' ) ) { echo 'Contributor'; } elseif ( user_can( $post->post_author, 'subscriber' ) ) { echo 'Subscriber'; } else { echo '<strong>Guest</strong>'; }NB: The call
global $post;may not be needed, but I also did not test this very thoroughly either so make sure you have a proper backup.Edit: Here is a gist of the code: https://gist.github.com/Cais/6196562
Forum: Hacks
In reply to: Modifying title of other widgetsI use the following in one of my themes:
/** * DMM Widget Title * * Fixes display issue when widget_title is empty by adding a space if it is. * * @package Desk_Mess_Mirrored * @since 2.0.1 * * @param $title * * @return string */ function dmm_widget_title( $title ) { if ( '' == $title ) { return ' '; } else { return $title; } /** End if - title is null */ } /** End function - widget title */ add_filter( 'widget_title', 'dmm_widget_title', 10, 1 );Not sure if will help but it is a working example.
Forum: Fixing WordPress
In reply to: How to display user role in postThe
$current_useris a global variable that may not be best suited for what you are trying to accomplish … it is used to represent the person currently viewing the site.Try using the post author’s information to establish the
$user_role.Have a look through these pages:
* http://codex.wordpress.org/Function_Reference/get_the_author_meta
* http://codex.wordpress.org/Function_Reference/user_can
* http://codex.wordpress.org/Roles_and_CapabilitiesForum: Hacks
In reply to: Modifying title of other widgetsThere is the
widget_titlefilter hook if that is what you had in mind?Forum: Plugins
In reply to: [BNS Featured Tag] Is it possible to exclude current post@moniqueh – Better late than never 😉
I’ve added another option to the plugin that allows you to exclude the current post when in single view.
Thanks, again, for the idea!
Forum: Plugins
In reply to: [BNS Featured Category] Removal of the read more 'Infinity' symbolThanks for the feedback Ro … although I had considered a filter to change that “symbol” I will add consideration for an additional option to change the “symbol” to my next review of the plugin although I cannot say at the moment if it will make it into the next release.
Forum: Plugins
In reply to: [BNS Featured Category] Removal of the read more 'Infinity' symbolThank you for using BNS Featured Category! The easiest method to “hide” the infinity symbol is via CSS. (Although I may add a filter for it in a future release.)
This CSS will work just fine to hide the symbol:
a.bnsfc-link { display: none; }Forum: Themes and Templates
In reply to: [Desk Mess Mirrored] blank block on my first pageThere are multiple contact points I can be reached at, please send me the additional details.
Forum: Themes and Templates
In reply to: [Desk Mess Mirrored] Excerpt for postings not working?The theme is written to show the full post (using
the_content) when displaying a “full” page view. The settings you are describing are used to change which page you are using to show first (read: site landing page) and in that case the theme will show the entire “page”.Your changes be they via the Parent-Theme or added a Child-Theme are changing the core display ideas behind the theme. I do not see this as an issue and would likely recommend adding a
front-page.phptemplate to the Child-Theme as a more correct solution than editing the core files of Desk Mess Mirrored or Multi as those edits will be over-written with new updates to those themes.No worries … we are all protective of our sites and just want to find a resolution to any issue that may arise.
You might consider looking at your server logs, or perhaps contacting your web host to have them help/investigate. Best of Luck!
The directory permissions starting from ../wp-content are 755; which means the “User” (you) can read/write/execute, the “Group” can read/execute and “Others” can read/execute.
Unfortunately the term “execute” is misleading for directories, it is actually referring to being able to access the directory; not being able to “run a script” as the permission allows with files.
This link may be helpful as well: http://www.thegeekstuff.com/2010/04/unix-file-and-directory-permissions/
The directory and file permissions for a default installation of the plugin appear correct (just re-tested with a fresh install of the current release).
You can read more about WordPress Security on this codex page http://codex.wordpress.org/Hardening_WordPress which may help explain why the directory (and files) have the permissions you are concerned about.
Forum: Themes and Templates
In reply to: Theme Unit Test FailingJust a quick note … the “Scheduled” post needed to be edited to actually make it a scheduled post after my latest import.
This is on a fresh local (XAMPP via Portable Apps) test environment, details below:
URL: http://localhost/BNS-Projects
WordPress Version: 3.5.1
Theme: Twenty Twelve v1.1
Multisite Enabled: False
PHP version: 5.4.7
Mod Rewrite: Enabled
MySQL version: mysqlnd 5.0.10 – 20111026
Current User Role: administrator