How to get next_posts_link working with a customised page
By changing the loop to use $wp_query instead of $query it worked. My challenge for another day is to delve into the differences between $wp_query and $query!
By changing the loop to use $wp_query instead of $query it worked. My challenge for another day is to delve into the differences between $wp_query and $query!
First: Indent your code consistently, your code editor should do this automatically, if it doesn’t, you should change, I can recommend Sublime Text as a free option, but there are hundreds of others Don’t spam PHP tags, <?php echo ‘you’; ?><?php echo ‘ dont ‘; ?><?php echo ‘need ‘;?><?php echo ‘this’; ?>, when <?php echo … Read more
Your best way would be to redirect to the theme’s 404 page in the event that the page being loaded matches the slug that you are referring to. Try this: function check_undesirable_page(){ global $post; if(is_page() && ($post->post_name==”YOUR-SLUG-HERE”)){ global $wp_query; $wp_query->set_404(); status_header(404); } } add_action( ‘wp’, ‘check_undesirable_page’ ); EDIT: Also a good idea to incorporate the … Read more
got this working! here is an example of how to set up the form. <script type=”text/javascript”> jQuery(document).ready(function($) { $(‘.metabox_submit’).click(function(e) { e.preventDefault(); $(‘#publish’).click(); }); $(‘#add-row’).on(‘click’, function() { var row = $(‘.empty-row.screen-reader-text’).clone(true); row.removeClass(’empty-row screen-reader-text’); row.insertBefore(‘#repeatable-fieldset-one tbody>tr:last’); return false; }); $(‘.remove-row’).on(‘click’, function() { $(this).parents(‘tr’).remove(); return false; }); $(‘#repeatable-fieldset-one tbody’).sortable({ opacity: 0.6, revert: true, cursor: ‘move’, handle: ‘.sort’ }); … Read more
Set post beginning date and final date
Custom fields in normal posts
You may need to html entity decode that title. Similar to the issue found here. Try this: get_page_by_title( html_entity_decode(‘The #1 Reason to Buy Right Now – THE MONEY!!’), OBJECT, ‘post’, ));
Different post types arranged on one page
Since the link doesn’t exist anymore, you can’t get rid of it. As Sisir wrote, probably there are backlinks to that URL and you can’t do anything about that (you don’t need to, as well). If your site got hacked you should always consider doing a complete recovery from backup (or, if this isn’t an … Read more
Hi The tables that you need to consider is wp_posts – Which contains all the details about the posts. wp_postmeta – Which is used to store the meta details for a post with relation to post_id. Query will be Select * FROM wp_posts a, wp_postmeta b WHERE a.post_status=”published” AND a.post_id = b.post_id AND b.meta_key = … Read more