newbiesup
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to show used tags on post?Use
<?php the_tags();?>
to show the tags associated to a post.You’ll need to add custom codes or install plugins to show like/view counts because these 2 are not integrated features with WordPress.
It’s weird…it worked on my local environment….let me check
Add the 1st piece of code to your functions.php.
The 2nd piece is the code to display the date, add it to where you want, let’s say on footer area, it usually goes to footer.php. Here is an example (I didn’t test it yet, use it on your own risk ;)):$lastModifed = get_option( 'lastModified' ); if ( $lastModifed ) { $date = $lastModifed['date]; $post_id = $lastModifed['post_id]; echo "Last Modified: ".date_format($date, 'Y-m-d H:i:s'); }
Forum: Fixing WordPress
In reply to: Admin Login getting redirected to unknown siteI guess that’s caused by your theme or plugin which has altered the login direct URL.
Try to deactive all plugins and use the default theme and check if it’s still the problem
My idea is to add an option to store the last modified time and change it whenever a post/page is updated.
We can use the
save_post
filter to do this.
Basically we check if the creation date equals to the modified date, if yes then the post should be newly created, if not, we update the option with the new array of latest modified date and latest modified post ID.add_action( 'save_post', 'save_last_modified_date', 10, 1 ); function save_last_modified_date( $post_id ) { // If this is just a revision, do nothing. if ( wp_is_post_revision( $post_id ) ) return; $created_date = get_the_date( 'U', $post_id ); $modified_date = get_the_modified_date( 'U' ); $attr = get_option( 'lastModified', array() ); if ( $created_date !== $modified_date ) { $attr['date'] = $modified_date; $attr['post_id'] = $post_id; update_option( 'lastModified', $attr ); } }
Then you can get the last modified date across the whole site by calling:
$lastModifed = get_option( 'lastModified' ); if ( $lastModifed ) { $date = $lastModifed['date]; $post_id = $lastModifed['post_id]; }
Forum: Plugins
In reply to: [WP AJAX Login and Register] Redirect and logout urlHi,
For now I don’t plan to add any settings to the plugin to avoid additional operation from the users, but the latest version does have a logout link if the user is logged in.
I will wait for more feedback from users and then see if it’s needed to get more settings.
Forum: Plugins
In reply to: [WP AJAX Login and Register] How to enable registration ?Hi,
You need to enable registration from the
Dashboard > Settings > General
and navigate to find the Membership tab, check the option “Anyone can register”.Forum: Plugins
In reply to: [WP Sticky Menu] No Menu Btn on mobile screen sizeHi,
You should change the CSS file.
A safe way is to add a piece of custom styles in a child theme instead of directly editing the plugin file.@media screen and (max-width: 910px) .wpsm-toggle, .wpsm-menu-toggle { display: none; }
Forum: Plugins
In reply to: [WP AJAX Login and Register] Unhook (or remove) Menu Linkhmmmm..nice try…
I’ll add an option to disable the “auto” feature.For now, I think you just hook it to a non-existing menu location and it should work.
Forum: Plugins
In reply to: [WP Random Button] Can I Exclude Category?Hi,
Did you update the plugin to the latest version? You can now exclude or include certain categories with the
nocat
orcat
attributes.For example:
[wp_random_button cat="1,2", nocat="3"]
Separate multiple IDs by commaForum: Plugins
In reply to: [WP AJAX Login and Register] Unhook (or remove) Menu LinkHi,
This plugin by default add the login/register link to the “primary” menu location and you can alter the location with the hook you posted.
You may need to check the existing menu locations registered by your theme normally you can find it in your
functions.php
. It looks like:register_nav_menus( array( 'primary' => __( 'Primary Menu' ), 'footer' => __( 'Footer Primary Menu' ), 'social' => __( 'Social Links Menu' ), ) );
Forum: Fixing WordPress
In reply to: Comment "submit" button is gone.Hi,
I just checked the url you posted and there is a ‘Post Comment’ button there.
Forum: Plugins
In reply to: [WP Sticky Menu] Show sticky menu only when passed scroll positionHi, for now there is no such settings, but maybe in future updates I’ll add it. Thank you for using the plugin
Forum: Fixing WordPress
In reply to: Can not upload Feature Image in page or postTry to disable all plugins and switch to default theme.
Then active them one by one to check if it’s caused by a plugin/themeForum: Fixing WordPress
In reply to: No comment optionIn addition to check comment settings for each individual post as @neotechnomad mentioned above, you should also check the theme file if it supports comment. By default there should be a comment function there like
<?php comment_form();?>