php - How to pull content from a Wordpress Category/Archive page and set it up as the index of a subdomain? -
i wanted pull contents (the whole page actually) of archive/category page on wordpress show in address subdomain.
here's want see, contents of page: http://intorremolinos.co.uk/placecategory/accommodation/ here's sample subdomain, want previous appear:catredi.intorremolinos.co.uk here's main domain:intorremolinos.co.uk
right now, showing exact same thing homepage has.
i have though it's not working. here's code i'm using, it's on index.php file on subdomain folder.
<?php /** * front wordpress application. file doesn't anything, loads * wp-blog-header.php , tells wordpress load theme. * * @package wordpress */ /** * tells wordpress load wordpress theme , output it. * * @var bool */ define('wp_use_themes', true); $_get['placecategory_id']=56; /** loads wordpress environment , template */ require('../wp-blog-header.php');
i have limited php knowledge can imagine, hope can help.
you should write in template file in index.php , looks core file:
- front wordpress application. file doesn't anything, loads
- wp-blog-header.php , tells wordpress load theme.
so go template , there several ways of getting want. if read codex bit, code should go in loop cause query category
conditional statement if url display placecategory_id=56
<?php $host = $_server['server_name'] . $_server['request_uri']; if($host == 'intorremolinos.co.uk/placecategory/accommodation/') { query_posts("cat=56"); } ?>
Comments
Post a Comment