It seems you are confusing actions and filters here. You are using an action. That means if you want to output some html you have to that inside the function. Now your are returning the value, but nothing is done with it.
So in the last line of your function you should have echo $title_yama
rather than return $title_yama
.
Also, in your code you are accessing a global variable $title_yama
, which you are then erasing. That doesn’t seem to make much sense.
Related Posts:
- Get post count of current loop when using multiple queries on one page
- Display products from specific category in shop page
- WP_Query: query posts by ids from array?
- How to get order of posts?
- pre_get_posts with get_posts
- Executing Queries in tag.php
- Query Custom Meta Value with Increment
- Identify which loop you are hooking into; primary or secondary?
- Looping through tabular data
- Trying to list out child pages with WP_Query
- Display featured products through custom loop in WooCommerce 3 [closed]
- Exclude first 5 posts of specific categories in the main loop
- How to bring specific post to front of wordpress loop?
- Why execute the_post()?
- Multiple WP_Query loops with Pagination Not Working
- Posts loop with pagination on a single post page
- WP_Query Order by Specific Post ID First
- How to change posts order on Category and Tag archives?
- WooCommerce Only OnSale Products Loop Snippet [closed]
- ACF – Get lowest & highest value from field
- Using one WP_Query object within the loop of another WP_Query object
- WP_Query on custom field and order results
- how to merge a WPQuery array with a PHP array and use the Loop to Output the result
- How to display 7 most recent days of posts?
- Create A Loop With A Variable Number of Posts For Each Bootstrap Row?
- WP_Query condition affects posts_per_page count
- Where is the WP_Query instance instantiated (when working with themes)?
- Custom Search Not Consistent with Results
- Show post number in widget loop
- posts_per_page not working for first page of pagination
- Loop Performance > JSON files vs. WP_Query vs. REST API
- Two loops on archive page
- Search form not working with custom query?
- WordPress ignoring LIMIT / posts_per_page despite being in wp_query
- Conflict with get_posts and the_content
- WordPress | Date not always appear [duplicate]
- Is_single() conditional tag returns null in query
- How do I rewrite this loop as a new WP_Query style-loop?
- How to provide meta_key array to wp_query?
- Adding a html class based on post count
- Trying to retrieve random post, getting a page
- Posts in loop all show the same author when there are many authors
- Multiple Rows in a using wp_query
- If have posts a week old, display, else display a different loop
- Daily drip of posts – based on user ‘startData’ – ordered oldest to newest
- How to add tax_query to $args with concatenation
- Meta query compare for ID’s greater than specific ID
- How to split a post and intercalate elements from a loop
- PHP – Loop custom post type categories within jQuery Tabs
- How to create a widget like this?
- WP_Query with one category in args shows other categories
- Ordering posts by custom field and grouped by month
- Hiding carousel indicators if there’s only one post
- relation OR instead of AND – Filtered term ID’s in loop
- Does query_posts have an effect on get_the_category?
- Second loop pagination changes URL, not content
- Compare “Main” post ID to ID inside wp_query loop
- Performance concerns: index.php vs taxonomy-$taxonomy.php
- Why does apply_filters behave different inside and outside a loop?
- Custom template for password protected page
- WP Query get only 1 post (sticky, not sticky etc)
- problem with the loop
- How can I do a orderby by the number of items? So basically list by starting with the array with the largest number of post
- Function the_posts_pagination() not compatible with WP_Query arguments
- Prevent Duplicate Post Counted by Query
- Show custom content when loop or wp query reaches specific time?
- Loop through array of pages
- How to show specify category template for both parent and child category
- Pagination inside the blog page not working
- Woocommerce featured products query no longer working
- Custom Query Pagination not working on static front page
- the_post_thumbnail and multiple WP_Query
- I have 3 categories, i want to display on a loop the last 3 of every category
- Why is my query not giving results?
- WP_Query doesn’t works inside loop
- Problem with custom WP_Query and underlying pagination/posts_per_page
- View related categories in order of posts
- Continue loop after $queryObject
- 2 Loops on one page – pagination of 2nd loop ignore array of excluded posts
- WP_query for posts with same post type AND same post category
- How to solve this script problem in theme directory?
- Show posts in category
- Both WP_Query and get_posts returning 1 post
- WP_Query for attachments without duplicating post_parent and displaying tagged image
- Custom post type archive organized by category
- wp_query display posts based on day
- Sorting Posts Based On Meta Value Using AJAX
- No content found on page 2 of pagination with 1 post per page
- Converting an existing query_posts to WP_Query
- loop through custom post types with meta data
- Loop being strainge
- Using Query In Post Type Archives
- Problem with WP_Query sort
- Get author meta data with no published posts in author.php?
- Help with showing text when something is entered in my search bar
- Print post data inside loop using theme content template
- the_excerpt() not working in custom archive
- Woocommerce set loop_shop_columns to be 3 in the main shop page loop only and 4 otherwise
- Prevent WordPress loop from displaying similar post titles
- Custom WordPress loop, articles not in same order as Array