Permalink problem

It turns out it was a server issue after all. Adding junk text to the .htaccess file should produce an error but it didn’t, indicating the .htaccess file wasn’t being read at all – https://docs.bolt.cm/3.4/howto/making-sure-htaccess-works I had another look on the hosting console and there was an option to “Sync” the .htaccess file. This fixed … Read more

Remove words from permalink when saving post automatically?

To update the slug of posts when they’re published, hook to save_post action as in this answer. Also use sanitize_title() to perform the needed sensitization: add_action( ‘save_post’, ‘wpse325979_save_post_callback’, 10, 2 ); function wpse325979_save_post_callback( $post_id, $post ) { // verify post is not a revision if ( ! wp_is_post_revision( $post_id ) ) { // unhook this … Read more

shortcode to output multiple images urls from media library id

Try this function image_thingy($atts) { // Merge attribtes from shortcode with defaults extract(shortcode_atts(array( ‘id’ => 1, ), $atts)); // Extract id’s from shortcode attributes and convert into an array $ids = explode(‘,’,$atts[‘id’]); $output=””; // Variable that holds the shortcode output, at the end this will be returned // Loop through ids and fetch urls, and … Read more

Remove the Parent category from the permalink but leave the child category

I think, there are two things to be resolved: 1) You need that posts (and other post types) also followed that command, so use both: add_filter( ‘post_link’, ‘remove_parent_category’, 10, 3 ); add_filter( ‘post_type_link’, ‘remove_parent_category’, 10, 3 ); 2) but then categories also need to have changed url, so use: add_filter( ‘category_link’, ‘remove_parent_category_2’, 10, 2); function … Read more

Permalinks Structure and 404 Question

It’s a bit of a trick to get a WordPress site working within a framework of a non-Wordpress (html only) site in a fully-integrated way (though it can be done!). To keep things simple, I’d keep them pretty separate for the moment, which it sounds like you’re happy to do. So I guess you have … Read more

Search result permalink

That kind of search request should already work(query it directly in your address bar), the component you’re missing is redirecting the non-pretty search requests.. For doing the redirect, you should find the following plugin still works.. http://txfx.net/wordpress-plugins/nice-search/ Hope that helps..

Add a css class to a taxonomy permalink

The filter you are looking for is term_links-$taxonomy, where $taxonomy is the taxonomy name. This will filter the $term_links links array before outputting by the_terms(): add_filter(‘term_links-cities’, ‘ad_filter_links’); function ad_filter_links($term_links) { foreach ($term_links as $term_link) { $term_link = str_replace(‘<a ‘, ‘<a class=”fancybox”‘, $term_link); } return $term_links; }

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