URL Custom Rewrite

You can do something like $path = $_SERVER[‘REQUEST_URI’]; if (home_url($path) == ‘http://www.myweb.com/action/frame’ ) { header(‘Location: ‘ . ‘http://www.myweb.com/wp-content/plugins/myplugin/frame.php’); }

ACF gives a syntaxError unexpected token

You’re missing quotes around the content of innerHTML. If correctoutput is <div></div>, then you’re script looks like this: $(‘#correcto’).innerHTML(<div></div>); Which is invalid, because you’re missing quotes. innerHTML needs a string, which is in quotes in JavaScript. That first < is where your error is coming from. So you need to do this: $(‘#correcto’).innerHTML(‘<?php the_field(‘correctoutput’); ?>’); … Read more

Add pagination to the posts retrieved by below query [duplicate]

<?php $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $news= new WP_Query(array( ‘post_type’=>’post’, ‘posts_per_page’ => 3, ‘paged’ => $paged, )); if($news->have_posts()) : while($news->have_posts()) : $news->the_post(); the_title(); endwhile; $total_pages = $news->max_num_pages; if ($total_pages > 1){ $current_page = max(1, get_query_var(‘paged’)); echo paginate_links(array( ‘base’ => get_pagenum_link(1) . ‘%_%’, ‘format’ => ‘/page/%#%’, ‘current’ => $current_page, ‘total’ => $total_pages, ‘prev_text’ => … Read more

Move main menu to top of screen

This is a two step solution: Install plugin “Options for Twenty Seventeen” (Link) Add the following CSS to “Design” > “Customizer” > “Additional CSS” .navigation-top { position: fixed; bottom: auto; left: 0; right: 0; top: 0; width: 100%; } .custom-header { padding-top: 50px; }