SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Custom query for Wordpress help please.

    Hi,
    I need to display archive post from a specific category with a specific tag and would like to be able to get the permalink to it.

    I want to link a string of text to this specific archive post group. I have posts that belongs to a certain category and is tagged with a specific tag. I then have a page that has a link that needs togo to these post. Now, here is the catch. I have numerous pages, 100 plus. Each page has a a string of text that links to another specific tag and category. I was hoping to use archive.php
    or tag.php to display all of this and use the permalink to link the text within the page. I really dont want to create a new archive.php or tag.php for each custom query. Is this possible?

    I could use the below code, but this obviously would create huge php file.

    PHP Code:
    <?php 
    if( is_page('##') {
        
    // custom loop
    }

    if( 
    is_page('##') {
        
    // custom loop
    ?>
    Any suggestions or help is appreciated.

  2. #2


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •