.htaccess help to a beginner

For the syntax of the .htaccess URL redirect have a look here: https://stackoverflow.com/questions/3374696/htaccess-url-redirect Then add a GET request to the URL based on the originally entered domain, e.g. www.domain.no/property/shops -> www.domain.no/property?type=shops Details here: https://stackoverflow.com/questions/13988815/htaccess-301-redirect-issue-with-url-variables

Custom templates stopped working

So, after all, it was a wordpress bug apparently… The problem is I was registering the following year taxonomy: register_taxonomy(‘year’, array(‘project’), array( ‘hierarchical’ => true, ‘labels’ => array(‘name’ => ‘Anos’, ‘singular_name’ => ‘Ano’), ‘show_ui’ => true, ‘public’ => false )); And it seems year is a reserved word for WP’s rewriting rules, and it must … Read more

Show all images attached to posts as a gallery page?

Create page template with this code : $args = array( ‘post_type’ => ‘attachment’, ‘posts_per_page’ => -1 ); $query = new WP_Query( $args); if($query->have_posts()){ //check if found any attachment while($query->have_posts()){ //loop $query->the_post(); //you can add your code here } }else{ // if found NO posts }

how to get the title, description, pictures on the page?

Try the same thing with get_children. It will get you. Here is an sample code for you. $args = array( ‘numberposts’ => -1, ‘order’ => ‘ASC’, ‘post_mime_type’ => ‘image’, ‘post_parent’ => $post->ID, ‘post_status’ => null, ‘post_type’ => ‘attachment’, ); $attachments = get_children( $args ); if ( $attachments ) { foreach ( $attachments as $attachment ) … Read more

Need help in creating splash intro page using custom page template

Let’s go from the beginning. First I’ll walk you through the enqueing of styles and scripts. In your functions.php file add: add_action( ‘wp_enqueue_scripts’, ‘splash_intro_scripts’); if ( ! function_exists( ‘splash_intro_scripts’ ) ){ function splash_intro_scripts() { if (is_page_template(‘page-intro.php’)) { wp_enqueue_style(‘google_font_1’, ‘https://fonts.googleapis.com/css?family=Arvo&subset=latin,latin-ext’); wp_enqueue_style(‘google_font_2’, ‘https://fonts.googleapis.com/css?family=Josefin+Sans&subset=latin,latin-ext’); wp_enqueue_style(‘google_font_3’, ‘https://fonts.googleapis.com/css?family=Josefin+Slab&subset=latin,latin-ext’); wp_enqueue_script( ‘bootstrap’, get_stylesheet_directory_uri().’/js/bootstrap.js’, array( ‘jquery’ ),”, false ); wp_enqueue_script( ‘blocs’, get_stylesheet_directory_uri().’/js/blocs.js’, array( … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)