Custom fields: Split data from single custom field’s sub-array to separate custom fields when saving post
Custom fields: Split data from single custom field’s sub-array to separate custom fields when saving post
Custom fields: Split data from single custom field’s sub-array to separate custom fields when saving post
Yes you can do that using $wp_query->current_post inside the loop. It returns the current posts index number inside the loop (starting form 0). Have a look at the following code block <?php global $wp_query; while(have_posts()){ the_post(); the_title(); //do your other stuff if($wp_query->current_post==1){ //do what you want to do after 2nd post }else if($wp_query->current_post==5){ //do what … Read more
Add remove_filter(‘get_the_excerpt’, ‘bwp_trim_excerpt’);, or whatever you’ve named your callback, just before the slideshow runs and add it back after. Without the actual code for both your callback and the slider I don’t think I can do better.
Programmatically Split A Post Into Multiple Pages
Have you tried using rewind_posts()? It looks to me like what you’ll have to do is either run the entire query only outputting titles then rewind and output content (however this would output all titles before the content, not in blocks of 5 as you have suggested) or wrap everything in a loop which runs … Read more
inserting every 200 characters automatically
I had a similar issue on a website with ~100k rows in wp_posts and ~500k in wp_postmeta. Truth is WordPress have some really slow queries in the admin when you start to have a lot of posts. The best way to find the bottleneck is to use the Debug Bar plugin. You will probably find … Read more
I don’t know what our single-XXX.php files look like, but if they include calls to get_header (and perhaps get_sidebar()and get_footer) you obviously will get the header twice as it is called again at the bottom of your first code block (and perhaps te rest of the regular page). In the second code block you avoid … Read more
If you are speaking about widgets – then you can use plugins like widget logic where you can easily create rules for displaying widgets. Let say your posts are separated into 2 categories – interactive functions and mathematics. Then you can create two different widgets displaying the latest post for the two different categories and … Read more
I managed to ‘solve’ the problem with the code below. It’s not a pretty solution but it does the job. Any adjustments to the code to make it more pretty are welcome. <?php /* Template Name: Page information */ get_header(); ?> <div class=”row”> <div class=”main-wrap” role=”main”> <?php do_action( ‘foundationpress_before_content’ ); ?> <div class=”row”> <div class=”column”><a … Read more