What is the proper way to call a function (from functions.php) on a link click?
What is the proper way to call a function (from functions.php) on a link click?
What is the proper way to call a function (from functions.php) on a link click?
I see two ways to do this: Automatically: by Matching AUTOR term name to TEAM post title Assuming the autor’s terms are the same as the custom post type team post titles, you could find the relation with code like: function show_product_autor(){ // get this woo-comm’s product author $authors = wp_get_post_terms( get_the_ID() , ‘autor’ ); … Read more
I have resolved the issue by installing a premium SEO plugin that checked all my back-links and picked up the culprit: an automated back-link rule that linked all instances of “website design” to the mentioned URL, thus producing the interesting (or rather normal) effect of one instance been deleted and automatically back-linking to the next … Read more
Try using this in your functions.php file or in a plugin file- add_filter( ‘login_url’, ‘wpse_290288_custom_login_url’, 10, 3 ); function wpse_290288_custom_login_url( $login_url, $redirect, $force_reauth ) { $login_page_id = 123; // ID of your custom login page return get_permalink( $login_page_id ); }
In-page link works in Firefox but not in Chrome
$terms = get_terms( [‘taxonomy’ => ‘some-taxonomy’, ‘parent’ => 123 ] ); // or $categories = get_categories( [ ‘parent’ => 123 ] ); Where the parent id is the one you want to get the subcategory from. This gives you all subcategories/-terms in an array. You can access data like name or term_id. For getting the … Read more
How about this: <a href=”https://wordpress.stackexchange.com/questions/293893/<?php echo get_post_type_archive_link(“consulta’ ).’?consulta=”.$consult->ID.”#form’; ?>”
Given a category ID, in this example as the variable $cat_id, you would do this by querying 1 post in that category, ordered by date in ascending order (oldest first). Then use that result to get the permalink to that post. $posts = get_posts( ‘numberposts’ => 1, ‘order’ => ‘ASC’, ‘cat’ => $cat_id, ); if … Read more
how to display country/region/subject/post reasonably
How can I add a sortable link_updated column to the Link Manager?