Franky57
Forum Replies Created
-
Forum: Hacks
In reply to: How to add colums to the screen layout of custom post type ?Sorry, I omitted to specify I would do this of my custom post type edit panel in the wordpress admin screens.
Forum: Hacks
In reply to: wp_list_bookmarks in foreach don't workHi !
category_name is the “name” of your category, not the “slug”
If your category name is “Exemple”, the slug will be “exemple” and wp_list_bookmarks will work because the function is not case sensitive for category_name
However, if your category name is “My Category Name”, the slug will be “my-category-name” and wp_list_bookmarks will not work
Forum: Hacks
In reply to: Woocommerce RedirectSo, i propose you comment thess 2 lines
$role = $wpdb->prefix . 'capabilities'; $current_user->role = array_keys($current_user->$role);
and keep this one
$role = $current_user->roles[0];
without forgot the ‘s’ at tthe end of role, and add just next
‘echo $current_user->roles[0];’
Just to ses what happens
…
Because I can’t figure out the utility of neither $role = $wpdb->prefix . ‘capabilities’; in your part of code nor array_keys witch return only an array of keys (without associated values) from the input parameter array …
Forum: Hacks
In reply to: Woocommerce RedirectOups !
You wrote “admin’si’trator” in your condition
maybe trying with “admin’is’trator”
:p
Forum: Hacks
In reply to: How To Retrieve An Image Attachment's Alt Text?Hi !
I would just make a little clarification
get_the_ID() works very well
but $post->id don’t work because id is “case sensitive”
id must be uppercase writed … “ID” and not “id”
Forum: Hacks
In reply to: Woocommerce RedirectHi !
Have you try $current_user->roles[0] ?
role with a “s” …
Forum: Hacks
In reply to: How to hide div if featured image caption does not exist?Or too :
if (
$thumbnail_image[0]->post_excerpt == ”)`…
Forum: Hacks
In reply to: How to hide div if featured image caption does not exist?Or maybe with this test :
if (!empty($thumbnail_image[0]->post_excerpt)) { return '<div class="front-caption">'.$thumbnail_image[0]->post_excerpt.'</div>'; } else { return; } }
… ?
Forum: Hacks
In reply to: How to override wp_list_pages and wp_list_bookmarks without modify core code ?Thanks for your suggestions.
I will try to look again with hooks and filters way, but I don’t find anything to solve my troubles at the time.
Maybe extend my own walker class could solve a part of my needs.
I will look for a solution again.
Thanks.
Forum: Hacks
In reply to: How to hide div if featured image caption does not exist?I wonder if you are using the appropriate function to return the thumbnail data.
Maybe with get_the_post_thumbnail()
https://codex.www.ads-software.com/Function_Reference/get_the_post_thumbnailI took a look for get_posts() in the codex but there is no ‘p’ key for the $arg parameters array …
Have you added
add_theme_support( 'post-thumbnails' );
in your functions.php theme file ?Forum: Hacks
In reply to: How to find documentation on wp_remote_get argumentsForum: Hacks
In reply to: How to find documentation on wp_remote_get argumentsHi !
I find this page in the codex
https://codex.www.ads-software.com/HTTP_API
But maybe it will not help you to solve the error …
Forum: Hacks
In reply to: How to hide div if featured image caption does not exist?Hi !
Have you try to replace your
isset($thumbnail_image[0])
by!empty($thumbnail_image[0])
?