Loop through all posts, show attachment if there

You can’t use the_title() as you haven’t set up the post data. Instead for the title you need to use: $post->post_title; To get the attachments you can then use get_children() something like this: $args = array( ‘numberposts’ => 1, ‘post_parent’ => $post->ID, ‘post_type’ => ‘attachment’ ); $attachments = get_children( $args ); foreach($attachments as $attachment) { … Read more

“No Data Received” error in Chrome every time i try to update the theme functions file

I contacted GoDaddy support and they advised me to login to the hosting manager and make the edits to the functions.php file from there. That way it worked ! Though i still couldn’t figure out why i was getting that problem when i tried to edit it from within my WordPress dashboard, but anyways the … Read more

Enqueue Stylesheets After Theme’s “rtl.css”

Stylesheet Printing Order WordPress does not load themes’ alternative rtl.css files using wp_register_style() or wp_enqueue_style(). As such, the stylesheet does not get added to WordPress’s style queue, and cannot be specified as a dependency when registering or enqueueing additional stylesheets. Instead, this stylesheet’s <link> element is added via the locale_stylesheet() function, which is attached to … Read more