My Styles are not registering

There can be multiple reasons why it may not be working. Possibility-1: You are adding the CSS file in a child theme. In that case, use the following CODE instead: function theme_styles_and_scripts() { wp_enqueue_style( ‘bootstrap’, get_stylesheet_directory_uri() . ‘/css/bootstrap.min.css’, array(), ‘3.3.6’, ‘all’ ); } add_action( ‘wp_enqueue_scripts’, ‘theme_styles_and_scripts’ ); get_stylesheet_directory_uri() returns the URL of your current theme … Read more

Can’t increase posts_per_page by variable

All right, I think I see what’s going on… As per WP pagination parameters documentation, posts_per_page is indeed cached. Somewhat… Basically, you could set this to “10” the first time, as you do, and then to 5 after that, but then use “offset” or “paged” parameters to get the posts you want. Your “load-next-amount” variable … Read more

Assign a picture URL to a page via PHP

You can use the add_post_meta function: add_post_meta( get_the_ID(), ‘my_custom_image_url’, ‘http://domain.com/image.jpg’, true ); The code above assumes that a) you will have only one image per page; and b) you are in a loop so get_the_ID will return a valid ID of the page you want to attach the meta-data to. Documentation here.