When my Google search lists landing page, the Title and link is for Home page

I’ve created 2 landing pages with target keywords web design eg web design strathfield. I entered the meta tags using Yoast plugin and I’ve checked the HTML and the title and description tags are correct. Landing pages are optimised.

But when I enter to google the search term web design strathfield it lists in the serp an entry with the Home page title and Description and the link is to the Home page.

The site: command lists the landing page. I’ve reindexed with the Console.

Can you help with why is Google listing the Home page in serp instead of the landing page?

Enable comments for custom template page

We use careerfy theme WordPress which is a system for a job board.

I would like to enable comments for each job post page, these pages are not listed on the WordPress admin panel, I can access it via child theme only, in this path: (wp-content/themes/careerfy-child-theme/wp-jobsearch/detail-pages/job/view3-job.php)

I have tried to add a shortcode but it seems not working.

reload page when going back in browser

is there any way to refresh the browser page when backtracking with javascript: window.history.go (-1);?

there is the option to use document.referrer; but I can only go back one page. yes, I must go back 2 or 3 pages I can’t get it to work.

I wanted to know if there is a possibility to use some function so that when you go back the page is refreshed.


How to run php code only for a specific widget on a page and not all widgets on that page?

I want to display extra information below the post title only for the posts widget on the home page and not the portfolio widget. I’m using WordPress’ the_title filter to do this and that works fine, but at the moment, it shows the extra info in both the portfolio and the posts widgets. I need a condition to restrict the filtering only to the posts widget. The post widget’s class name is "home-post-widget"

My current code looks like this.

function add_rating_html( $  title) {      if (in_the_loop()){         $  out = "Rating: 5";         $  title .= $  out;     }     return $  title; }  add_filter('the_title', 'add_rating_html',1);  

Any help would be most appreciated.

Create page in category using REST API

The REST docs show how to create a page: https://developer.wordpress.org/rest-api/reference/pages/#create-a-page

But it makes no mention of how to set categories for that page. It is also not mentioned in the categories page (https://developer.wordpress.org/rest-api/reference/categories/)

I assume this has to be done by adding data to meta property but I can’t find an example.

How do I create a page in specific categories?

How to change Gallery image url in product page ? In function.php?

My code is like

add_filter('wp_get_attachment_url', function($  url){     if(strstr($  _SERVER['HTTP_ACCEPT'], 'image/webp')!=false){         return $  url.".webp";     }else{         return $  url;     } }); 

But only the last image in Gallery changed to xxx.webp . I want to know how to change other image ….I want all of them changed to xxx.webp

I dont want use a plugin (Or if i have to …),Please HELP ,Thanks .

How do I display/pull posts from subdomains to the landing page (domain) in WordPress Multi-site?

I have 8 sites in my multi-site network:

  1. Group Landing site (domain)
  2. Group 1 site (subdomain 1)
  3. Group 2 site (subdomain 2)
  4. Group 3 site (subdomain 3)
  5. Group 4 site (subdomain 4)
  6. Group 5 site (subdomain 5)
  7. Group 6 site (subdomain 6)
  8. Group 7 site (subdomain 7)

Essentially, Groups 1 to 7 will have separate contents. However, the Group Landing site will have content from both. I would rather not have the user enter the content twice. The post must also link/point to the Group/subdomain where it was originally published.

Is there a way for me to pull content from Group 1 and Group 2, and display it in Group Landing?

(Clarification: I want to pull content. That means, that I want to be able to run a query and get information from other posts and pages and display on the front end. I am not looking to duplicate content on the back-end, or to share content on the back-end. So, if the source is deleted than nothing will show on the front-end.)

What I did: I’m not sure if I did it correctly (I don’t even know how to code), but I appended the code snippet below in the functions.php of my theme:

foreach( $  blog_ids as $  blog_id ){     switch_to_blog( $  blog_id );     $  post = get_post( $  post_id );     restore_current_blog(); } 

Reason for asking: I want to replicate this feature from the front/homepage of this website: https://www.inquirer.net. Also, the web hosting support team cannot provide snippets for this feature because they only have Python/Go developers rather than WordPress developers.

My woolentor custom page does not load on mobile

I have just successfully created my custom shop page using woolentor, and it loads perfectly on desktop. However, when I try to visit the same custom shop url on mobile device it redirects to homepage, and that’s all I get. This concerns me a lot since most users surf the internet on mobile device. Any help with this will be highly appreciated. Thank you, Michael

On clicking on the category name the page is redirecting on 404 pge

I have created a custom post type and added 60 posts and added each post in the category. I am able to display the post and category on the page and I am using the below code

function intelligenceList( $  atts ){   $  args = array(           'post_type' => 'intelligence',         'post_status' => 'publish',         'posts_per_page' => 70,          //'orderby' => 'title',          //'order' => 'ASC',      );    if(!empty($  _REQUEST['keyword'])){ $  args = array(   'post_type' => 'intelligence',   's' => $  _REQUEST['keyword'],   // 'meta_query' => array(   //   array(   //     'key' => $  _REQUEST['keyword'],   //     'value' => $  _REQUEST['keyword'],   //     'compare' => 'LIKE'   //   ),         // ) ); }   $  loop = new WP_Query($  args);     $  data ='';    $  data.='<div class="intelligenceList innerBox"><ul>';    if($  loop->have_posts() ) {         while($  loop->have_posts() ) {         $  loop->the_post();         $  tid = $  loop->ID;     $  calegoryList = get_the_terms( $  tid , 'intelligence_cats' );     foreach ( $  calegoryList as $  cat ) {       $  category_link = esc_attr( esc_url( get_category_link( $  cat->term_id ) ) );       $  catname=$  cat->name;         }              $  data .='<li>                 <div class="intelligenceBanner"> <img src="'.get_the_post_thumbnail_url($  tid,'large').'" alt="'.get_the_title($  tid).'" class="thumbnailPic">                 </div>                 <div class="intelligenceContent">                 <h6><a href="'.$  category_link.'">'.$  catname.'</a></h6>               <h3>'.wp_trim_words(get_the_title($  tid),9, '...').'</h3>               <p>'.wp_trim_words(get_the_excerpt($  tid),40, '...').'</p>               <a href="'.get_permalink().'">READ</a>               </div>             </li>';             }         }         else{           $  data.='<li>Sorry, no posts matched your criteria.</li>';         }  $  data .='</ul></div>'; echo $  data;   //return $  postData;  wp_die(); // it will remove 0. } 

Is there any issue with the below code? because when I click on a category then it’s redirecting to the 404 pages. I am using below code for categroy

foreach ($  calegoryList as $  cat) {           $  category_link = esc_attr( esc_url( get_category_link( $  cat->term_id ) ) );           $  catname=$  cat->name;          }       <h6><a href="'.$  category_link.'">'.$  catname.'</a></h6> 

I try to reset the permalink setting but still going to the 404 pages. Would you help me out how to hyperlink the category name?

Do I need to create the category.php page