Get post by tag

Look at this section: Tag parameters in WP Codex, where is explained search by tags. Your code like right. Try change numberposts to int: <?php $args = array( ‘numberposts’ => 3, ‘post_status’ => ‘publish’, ‘tag’ => ‘travel’ );

Update all posts in a loop everyday

Yes, WordPress has a cron system called WP Cron (which is not the same as a *nix cron). The idea is that your plugin would register a task (a WordPress action callback) that performs the desired logic (in your case, running the code that updates all the posts).

Count the number of a post types associated with another post type

Sounds like you need to use WP_Query or something similar. <?php // First query: get all destinations $args = array( ‘post_type’ => ‘destination’, ‘posts_per_page’ => -1, ‘no_found_rows’ => ‘true’ // skips pagination ); $destinations = new WP_Query($args); // Now for every destination: foreach($destinations as $destination) { // Second query to get tours $secondargs = array( … Read more

Auto delete posts based on content text

If you’re comfortable using phpMyAdmin, you can run this query: DELETE FROM wp_posts WHERE post_content LIKE “%A line of same text that should be deleted%” Replace with the text you’re wanting to remove, but keep the “% %” symbols. The percent symbols mean to search for that string anywhere inside the post content – even … Read more

Posts and Pages: 404 Page not found

Did you try to re-save Permalinks? Navigate to: WordPress Dashboard > Settings > Permalinks: Click “Save Changes” and then click on the link of the page that should work from the “Edit Page” of that page. Also review Permalinks settings if they are correct. If it still doesn’t work, you can try to debug the … Read more

.html end of URl affected to SEO?

If you currently have /path/to/site.html and change it to /path/to/site, this will affect SEO, as search engines think they know the url (the former). However, there are solutions to this. You can either keep the .html at the end of the URL (there should be no problem to use a WordPress permalink with .html in … Read more

Post is blank when I click on the link

Your site puts quotes in the permalink structure. Find out where these things come from. Without these quotes it appears to work. http://fohh.vavee.com/2017/06/24/harmony-hall-launches-10th-anniversary-celebration/ A temporary VERY dirty solution is to filter the quotes out of the global $content variable.