Interactive maps in wordpress
Interactive maps in wordpress
Interactive maps in wordpress
I presume you are getting the page content like so: $page_id = 1; $page = get_page($page_id); $content = $page->post_content; echo $content; If thats the case then you can run the content through the the_content filter: $content = apply_filters(‘the_content’, $content); The will process the content as if it was run through the_content() function.
I still can’t see how the code and the problem is substantially different from your original topic; however, try to add your text into the typical ‘else’ location for a loop if no posts are found; change this line: <?php endwhile; endif; ?> to: <?php endwhile; else : echo ‘<h3 class=”no-related-posts”>sorry but there are no … Read more
Hook into ‘plugins_loaded’, that should be early enough. Theme output cannot be sent at this stage, so you should be safe – if you really just need the user agent.
You get the error because you try to call php inside php. Try to use this snippet and see what is different: <?php if(get_field(‘post_image’)) { echo ‘<img src=”‘. get_field(‘post_image’) .'” />’; } else { echo ‘<img src=”‘ . get_bloginfo(‘template_url’) . ‘/images/images/default.jpg” />’; } ?> Also pay attention that bloginfo immediately prints value, when get_bloginfo returns … Read more
You have to use the Slug of your Custom Post Type “portfolio” for the filename, as you pointed out, single-portfolio.php is correct if your slug is “portfolio”. You just have to take one more step, create the file in the Theme directory (the same folder where your single.php is located). WordPress automatically selects the single-portfolio.php … Read more
If it really is the header you want to edit, you can find its source here: /wp-content/themes/Wallbase/header.php Depending on A) what it is exactly that you want to customize, and B) how your theme is set up and what options it comes with, you might want to try the Theme Options, which can be found … Read more
You need to set your ACF field to return the image object instead of the URL. You can then use the following code to retrieve the image and alt text: <?php $slideshow_image = get_field(‘slideshow_image’); // Check for alt text – if there isn’t any, use the image title $alt = ($slideshow_image[‘alt’]?$slideshow_image[‘alt’]:$slideshow_image[‘title’]); // Return full size … Read more
Also when I apply #hawaii-map as the class, nothing happens. If ‘hawaii-map’ is the class, try using: .hawaii-map { display: none; } The ‘#’ is for if it’s id=’hawaii-map, not class.
Capture all the wp_head content add_action( ‘wp_head’, function(){ ob_start(); }, 0); Replace endings and output results add_action( ‘wp_head’, function(){ $head = ob_get_clean(); echo str_replace(‘/>’, ‘>’, $head); }, 99999);