the_content() stop images being pulled through
Add this code to your functions.php function mdc_remove_img($content) { $content = preg_replace(“/<img[^>]+\>/i”, “”, $content); return $content; } add_filter( ‘the_content’, ‘mdc_remove_img’ );
Add this code to your functions.php function mdc_remove_img($content) { $content = preg_replace(“/<img[^>]+\>/i”, “”, $content); return $content; } add_filter( ‘the_content’, ‘mdc_remove_img’ );
There’s another great article here. They walk you through the 4-step process that they used to set it up.
Since WordPress is having trouble recognizing your custom template files, you could use this instead. Insert into your single.php file. Based on your description above, it sounds like you don’t have a single.php file so you will likely have to create one. If you do already have a single.php file then there is likely still … Read more
Nevermind. For some reason, I had to go to my permalinks page and click ‘Save Changes’ for this to show up. It is bewildering.
Your answer may be with Youtube you can put videos on there and set them so that the only people that can find them must have the full url. Then you can control who gets the URL path. I have seen pay sites actually do this. Just a suggestion.
There was nothing wrong with the query or the core WordPress-code, but a plug-in was in the way. Thanks for all help and good advice!
try changing the value of ‘posts_per_page’ => ‘-1′ this is what’s probably messing up your query, if you want two try setting it to : ‘posts_per_page’ => ‘2’ also try to comment it out….. I think it’s quite self-explanatory, but to really understand wp-query read the Codex ref..
It sounds like issues should be a custom taxonomy rather than a custom post type.
$labels = array( ‘name’ => _x( ‘Categories’, ‘taxonomy general name’ ), ‘singular_name’ => _x( ‘Category’, ‘taxonomy singular name’ ), ‘search_items’ => __( ‘Search Types’,’SkyDance’ ), ‘all_items’ => __( ‘All Category’,’SkyDance’ ), ‘parent_item’ => __( ‘Parent Category’,’SkyDance’ ), ‘parent_item_colon’ => __( ‘Parent Category:’,’SkyDance’ ), ‘edit_item’ => __( ‘Edit Categories’,’SkyDance’ ), ‘update_item’ => __( ‘Update Category’,’SkyDance’ ), … Read more
The solution is simple: in the first loop, you are setting the $amazon_link like this: $amazon_link = get_field(‘amazon_link’, $image[‘ID’]); but in the second loop, you are setting a $link, like this: $link = get_field(‘amazon_link’, $image[‘ID’]); but you’re still trying to echo $amazon_link variable later on, which has never been setup in the second loop, so … Read more