PBP_Editor
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Category ID not being recognized in query_postsIt may be easier to pull in posts using a tag
<?php query_posts('tag=yourtaghere'); while (have_posts()) : the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <br /> <?php the_content('Read the rest of this page ?'); ?> <?php endwhile; ?>
Forum: Your WordPress
In reply to: Entertainment website built on WordPress | pbpulse.comWe are having some issues with our servers as well – much of the performance drag is being caused by these issues.
Forum: Your WordPress
In reply to: Entertainment website built on WordPress | pbpulse.comThanks for the feedback. I will take a look and see what I can remove or consolidate. Unfortunately some of the JavaScript being employed is from third party sources like the Brightcove video and the photo includes – so I am stuck with those.
Forum: Fixing WordPress
In reply to: Feed xmlyoursite.com/rss
yoursite.com/rss2
Forum: Fixing WordPress
In reply to: How do I add rss link to category listIf it’s in the sidebar and not in the loop you will have to create a loop and then place that code within it
Forum: Fixing WordPress
In reply to: RSS and PermalinksHmmm. Those links are resolving fine for me.
I got here from the feed
https://freehrguide.com/2009/making-hr-strategy-internal-clients/Forum: Themes and Templates
In reply to: Need Catergory Pages to layout like frontpageYou can also copy the index and name it a category-#.php
So if you have a category id 1 you would copy index.php and name it category-1.php
Then in the new category-1.php change the PHP references to cat= and you will have posts only from the category display.
Forum: Fixing WordPress
In reply to: RSS and PermalinksSend some examples of post links and rss links
Forum: Fixing WordPress
In reply to: Change Background Image per pageMake sure the image path is correct or just go ahead and use the complete path. And it should show up.
Forum: Fixing WordPress
In reply to: Change Background Image per pageProbably the best approach is set some conditional statements in the page.php file
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if (is_page('page1') ): // page 1 ?> <style type="text/css"> body {background-color:#000;background-image:url(/images/background.jpg);background-repeat:repeat;} </style> <?php elseif (is_page('page2') ): // page 2?> <style type="text/css"> body {background-color:#000;background-image:url(/images/background2.jpg);background-repeat:repeat;} </style> <?php endif; // end the if, no images for other other categories ?>
Forum: Fixing WordPress
In reply to: Change Background Image per pageSure I set a background according to categories on my site, but you could also set per page id – is_page
Here is the category conditional
<?php if (have_posts()) : ?> <?php $cat_obj = $wp_query->get_queried_object(); $cat_id = $cat_obj->cat_ID; ?> <?php if (in_category('1001') ): // category 1001 ?> <style type="text/css"> body {background-color:#000;background-image:url(/images/background.jpg);background-repeat:repeat;} </style> <?php elseif (in_category('1002') ): // category 1002 ?> <style type="text/css"> body {background-color:#000;background-image:url(/images/background2.jpg);background-repeat:repeat;} </style> <?php endif; // end the if, no images for other other categories ?>
Forum: Fixing WordPress
In reply to: How do I add rss link to category listSorry, try the code with the href below
<?php $cat_obj = $wp_query->get_queried_object(); $cat_id = $cat_obj->cat_ID; echo '<a href="'; get_category_rss_link(true, $cat, ''); echo '">RSS feed for this section</a>'; ?>
Forum: Fixing WordPress
In reply to: How do I add rss link to category listTry this
<?php $cat_obj = $wp_query->get_queried_object(); $cat_id = $cat_obj->cat_ID; echo ‘RSS feed for this section‘; ?>
Make sure it’s within the loop.
Forum: Fixing WordPress
In reply to: Help – only homepage works – all other links 404mod_rewrite is usually the issue here. make sure it is enabled in the server configuration
If you are on apache make sure rewrite module is enabled
You can got to the httpd.conf file and change this
#LoadModule rewrite_module modules/mod_rewrite.so
remove the # and it will be active.
If you dont have access to this file you can drop this in your htaccess file which should be on your server root
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
Forum: Fixing WordPress
In reply to: Adding posts to wp_list_pages<?php query_posts('showposts=10'); while (have_posts()) : the_post(); ?> <ul> <li> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><strong><?php the_title(); ?></strong></a> </li> </ul> <?php endwhile; ?>