How do I modify the custom footer text and get theme version number to show in wordpress admin?

Try returning your span instead of echoing it. function modify_admin_footer() { return ‘<span id=”footer-thankyou”>Developed by <a href=”http://www.toolcart.com” target=”_blank” rel=”noopener noreferrer”>Toolcart Theme Version:</a>.</span>’ . wp_get_theme()->parent()->Version; } add_filter( ‘admin_footer_text’, ‘modify_admin_footer’ );

Edit the_category (); for a hierarchical display

You could assign the post only to the child category, and call the function like so: the_category( ‘ ‘, ‘multiple’ ); This will output (notice the whitepsace between the anchor tags): <a href=”https://example.com/category/parent/”>parent</a> <a href=”https://example.com/category/parent/child/” rel=”category tag”>child</a>

If ACF field is empty show different value [closed]

This is basically a php question. add_filter( ‘facetwp_map_marker_args’, function( $args, $post_id ) { $field = get_field( ‘Type’, $post_id ); // Get this post’s ACF value $tent=”tent”; if( !$field ){ $field = $tent; } $args[‘icon’] = ‘https://www.muddycamper.com/wp-content/themes/oceanwp-child-theme-muddy-camper/images/markers/’ . $field . ‘.png’; return $args; }, 10, 2 ); You could do it your way as well, but … Read more

Use html inside shortcode function

There are several things you need to know, after which the problems become obvious: you join strings together using . for example ‘hello’ . ‘world’ is the same as ‘helloworld’ You end a statement/action/call with ;, this is you telling PHP that you have finished saying something, and you are going to say something new … Read more

Enable taxonomies by post type in an array of CPTs

I have tweaked theyour code and it should work.. please give it a try add_action(‘init’, ‘all_custom_post_types’); function all_custom_post_types() { $types = array( array(‘the_type’ => ‘event’, ‘single’ => ‘Event’, ‘plural’ => ‘Events’ ), array(‘the_type’ => ‘resource’, ‘single’ => ‘Resource’, ‘plural’ => ‘Resources’ ), array(‘the_type’ => ‘team’, ‘single’ => ‘Team’, ‘plural’ => ‘Team’ ), ); foreach ($types … Read more

Set Taxonomy based on post status

This is what works with the help of WebElaine above. I had to pass the postID to has_category() and then set variables. function add_categories_automatically($postID) { $p_published = get_post_status($postID) == ‘publish’; $p_draft = get_post_status($postID) == ‘draft’; $p_cat = has_category( ‘billed’, $postID); if ($p_draft == ‘draft’){ $catsID = array(1); //active wp_set_post_categories($postID, $catsID); } if ($p_published == ‘publish’){ … Read more

How can I add a filter for specific categories on functions.php?

As pointed out in this answer, using the request filter means that some (if not all) of WordPress’s is_* functions are unavailable. Use the corresponding member functions of your new WP_Query instead, as they should be available. function graphene_alter_the_query( $request ) { $dummy_query = new WP_Query(); $dummy_query->parse_query( $request ); if ( ! $dummy_query->is_category( 25 )) … Read more