How to prevent WordPress from abbreviating long slugs?

Without you sharing a post title and its resulting slug to see what is happening, I can only guess. But a lot of the time stop words, or extremely common words, are stripped from slugs. This would be words like the, a, an, etc. The plugin Yoast SEO will do this if you’re running it … Read more

Specifically Link To the “Leave a review” part of product page? [closed]

You would probably need to do this with jQuery by detecting the hash value and activating the class based on that. Something like this might work: add_action(‘wp_footer’, ‘custom_review_form_activate’); function custom_review_form_activate() { echo “<script>if (window.location.hash == ‘review_form’) { jQuery(‘.reviews_tab’).addClass(‘active’); }</script>”; } (Of course if your theme or customizations already have some jquery you can add it … Read more

Automatically Add Page Links to Nav Menu

Turns out is_plugin_active is defined in wp-admin/includes/plugin.php so it’s only available within the admin unless I call it. I needed to add include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ ); so my final code was as shown below which I also tidied up a bit too. add_filter(‘wp_nav_menu_items’,’add_about_page_to_menu’, 10, 2); function add_about_page_to_menu( $items, $args ) { include_once( ABSPATH . … Read more

Creating Menu Links in a Custom Theme

If you’re not using the default menu manager then already following a bad practice. Without using the menu manager you can create menu the way you’re doing but I think get_permalink() will add some flexibility in this case or you can check the user contribution section of get_permalink(). There are some nice examples which might … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)