truongwp
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Ajax return the wrong dataDid you try viewing the whole page returned from AJAX? That page may contain some error messages.
Forum: Developing with WordPress
In reply to: Ajax return the wrong dataHello,
Can you post your JS code?
Hi @tinkertravels,
Please make sure that global Inactive color option contains some value https://imgur.com/a/dtjeeJH. I guess it is empty. Currently, on the frontend, it is using CSS
color
from parent tags for inactive color.You can add that code to theme’s functions.php file. Let me know if it works or not.
Thanks.
Hi @tuttopia,
You can use css
border-radius
to make them non-squaredHi @tinkertravels,
Do you mean the rating output or input? Can you please share me a screenshot or URL where half stars do not work? Currently, it works correctly for me.
- This reply was modified 6 years, 6 months ago by truongwp.
Forum: Plugins
In reply to: [Meta Box] erreur with wp_delete_post($id_post, true)Hi there,
Where do you use
wp_delete_post()
function?Thanks.
Forum: Plugins
In reply to: [Meta Box] Metabox and PolyangHi Hung,
Do you have an
wpml-config.xml
file?
If you don’t have, please create it and follow the documentation here https://wpml.org/documentation/support/language-configuration-files/Thanks.
Forum: Developing with WordPress
In reply to: How to edit the rss/feed outputI mean adding that code to your theme or plugin which you are developing. I tested by adding it to hello dolly plugin and it works. Remember to use Ctrl + f5 to refresh the feed page (https://yourdomain/feed/)
Forum: Developing with WordPress
In reply to: register_post_type() not show menu in admin.Yes. I found the problem here:
if ( $ptype_obj->show_in_menu !== true ) continue;
WordPress use Not Identical operator instead of Not Equal to check when render the admin menu. I tested with value is
1
and it also doesn’t work.Forum: Developing with WordPress
In reply to: How to edit the rss/feed output@ronaldb73 Sorry for misunderstanding. I have a solution.
The output of
rss2
is located atwp-includes/feed-rss2.php
. There is no filter to hide the<dc:creator>
tag (this is author tag).But that file is included from
do_feed_rss2()
function which hooked todo_feed_rss2
action, so you can add your own do_feed_rss2 function to include your custom feed output file.Step 1: Copy file
wp-includes/feed-rss2.php
to your plugin, then remove<dc:creator>
.
Step 2: Add the code below to your plugin, remember to change the file path:remove_action( 'do_feed_rss2', 'do_feed_rss2', 10 ); function prefix_do_feed_rss2( $for_comments ) { var_dump($for_comments); if ( $for_comments ) load_template( ABSPATH . WPINC . '/feed-rss2-comments.php' ); else load_template( plugin_dir_path( __FILE__ ) . 'feed-rss2.php' ); // Change to your own file path. } add_action( 'do_feed_rss2', 'prefix_do_feed_rss2' );
Step 3: Check the rss output. Use Ctrl + F5 if it doesn’t work.
Forum: Developing with WordPress
In reply to: register_post_type() not show menu in admin.@bearshang Yes. I know.
'1'
,'true'
or'false'
always returnstrue
. So your post type should be shown in admin menuForum: Developing with WordPress
In reply to: register_post_type() not show menu in admin.@bearshang I think
'True'
of'false'
will be treated astrue
when convert to boolean. I don’t think that is the problem.Forum: Developing with WordPress
In reply to: register_post_type() not show menu in admin.Can you use
print_r( $tnPostType )
and show the result?