more news/blog pages?

resolved (122 posts) (28 voices)

  1. pixelsoft
    Member

    Hello,

    How to add more than one news/blog pages?

    Currently you have to specify the blog page from the theme settings, what i need to have seprate page for each category?

    Posted 1 year ago #
  2. Dorian
    Support

    Hello pixelsoft,

    I'm afraid that currently the team doesn't support this. It is part of extra customization. You should look forward hiring a freelancer to do this for you.

    Cheers

    Posted 1 year ago #
  3. Elliott
    Support

    Hey pixelsoft,

    I went ahead and created a template for this as I thought other people would want to do this also.

    Download the attached template-one-category.zip and extract it to wp-content/themes/infocus/

    In your dashboard create a new page and select the 'One Category' template. Then you would need to set a custom field with a name of 'category' and a value of whichever category you would like to appear.

    Attachments

    1. 2.jpg (37.3 KB, 31 downloads) 1 year old
    2. 1.jpg (28.1 KB, 18 downloads) 1 year old
    Posted 1 year ago #
  4. Elliott
    Support

    pixelsoft,

    Sorry about that, try this one. It should work whether your category has spaces or not.

    @jayce103, I will look into it.

    Attachments

    1. infocus-template-one-category.zip (2.5 KB, 124 downloads) 1 year old
    Posted 1 year ago #
  5. Elliott
    Support

    jayce103,

    This one should work with Awake. Try it out and tell me if everything works fine. Just follow the instructions above.

    Attachments

    1. awake-template-one-category.zip (1.3 KB, 145 downloads) 1 year old
    Posted 1 year ago #
  6. jayce103
    Member

    Like a dream Elliott, thanks for this. Webtreats= the only pro themes for me :D

    Jayce

    Can I make a suggestion and put this as a sticky? Probably everyone that uses Wordpress will want to do this.

    Posted 1 year ago #
  7. Elliott
    Support

    Thanks for the suggestion jayce103, I created stickies for tutorials and will just create a link to this post.

    Posted 1 year ago #
  8. pixelsoft
    Member

    Thanks alot
    I used this new file and got one page working but ...

    I added other 2 pages to use other categories and both giving the prev error:
    "Sorry, that document can not be found."

    only one page is working fine

    Posted 1 year ago #
  9. MiguelGonzalez
    Member

    Despite being a different category the page still has the heading "News" - any ideas why?

    Posted 1 year ago #
  10. Elliott
    Support

    Hey MiguelGonzalez,

    Right now it uses the page title. Make sure your page title is not set to "News" and if it is then try changing it to whatever you feel like.

    Let me know if this works.

    @pixelsoft, I just tested it and it is working with multiple pages. Are you sure you are typing in the category name correctly? Currently it only accepts one category to display, make sure you are not trying to type in multiple categories. This may be updated in the future though.

    Posted 1 year ago #
  11. Elliott
    Support

    For other users that are using these templates and cannot get them to work..

    If your slugs are different from your category names then you would need to type in your slug in the custom field. To view your category slugs login to your admin menu and go to Posts -> Categories.

    The value you need to type in is the slug as seen in the attached image.

    Attachments

    1. 1.jpg (22.7 KB, 5 downloads) 1 year old
    Posted 1 year ago #
  12. suburb
    Member

    Hi,

    I'm having the same issue as MiguelGonzalez. The page name is "News" but the <h1> displays "Blog". I turned off all plug-ins and the error still occurred.

    I created a page called "News2" with everything the same as "News" EXCEPT for the template and it displayed correctly. When I changed it to "One Category", the heading changed to "Blog" like the other page.

    FWIW, the posts are displaying correctly (and everything else seems to be cool).

    Thanks much.

    Posted 1 year ago #
  13. Elliott
    Support

    Hey Suburb, you must have your header disabled. Just caught this.. find line 165 which should look like this..

    <h1><?php echo get_the_title($blog_page) ?></h1>

    And change it to this..

    <h1><?php echo the_title(); ?></h1>

    Let me know if that clears it up.

    Posted 1 year ago #
  14. suburb
    Member

    Perfect. Thank you. And many thanks for the super quick reply.

    Posted 1 year ago #
  15. mglodfelter
    Member

    Help, I'm not figuring this out. I have a blog page and I created a news page as well. When I post to the news page, it post on both the blog page and the news page.

    What I am not understanding here?

    Posted 1 year ago #
  16. Elliott
    Support

    Hello mglodfelter,

    If you do not want your posts to show up on your regular default blog page then you would need to exclude them under the blog tab.

    This will not affect the One Category template so you can select a category to show up on this template and exclude it from your regular blog page.

    Posted 1 year ago #
  17. mglodfelter
    Member

    I'm am so sorry for being so dumb on this. What do you mean exclude them under the blog tab? I could not find a blog tab anywhere. Please forgive me for my ignorance.

    Posted 1 year ago #
  18. Elliott
    Support

    Sorry, it is my fault for not being clear.

    In your dashboard under the inFocus settings you would need to click on the blog tab (see attached image). When you click on categories to exclude they will not be shown on your regular blog page (not the one category template).

    Attachments

    1. 1.jpg (41 KB, 0 downloads) 1 year old
    Posted 1 year ago #
  19. autreschine
    Member

    Hi,
    I followed all the steps and it's working fine! Just a little detail that I don't know how to fix. I would like my other blog page to a left sidebar like all of my pages... is there a way to do it?

    Posted 1 year ago #
  20. Elliott
    Support

    Hello autreschine,

    That is currently not a feature of inFocus but I will look into getting it done for you as other people might want this also.

    I'll get back with you by the end of the day.

    Posted 1 year ago #
  21. Elliott
    Support

    Forgot to ask whether you are using inFocus or Awake. Here is one for inFocus, test it out and let me know if it works okay for you. If it works good then I'll create one for Awake.

    Attachments

    1. template-one-category-left-sidebar.zip (2.6 KB, 25 downloads) 1 year old
    Posted 1 year ago #
  22. autreschine
    Member

    Hi Elliott, I'm using AWAKE, can I use the template you create?

    thanks again

    Posted 1 year ago #
  23. Elliott
    Support

    Hey autreschine,

    Try this one and let us know if it works for you.

    Attachments

    1. awake-template-one-category-left-sidebar.zip (1.4 KB, 34 downloads) 1 year old
    Posted 1 year ago #
  24. autreschine
    Member

    Hi Elliott,
    it's working, but the left sidebar seems to be larger than the other pages' one. can you fix that too?

    thx again

    Attachments

    1. left_sidebar.jpg (142 KB, 6 downloads) 1 year old
    Posted 1 year ago #
  25. Elliott
    Support

    Hello autreschine,

    If you open the file up and at the bottom around lines 104 - 109 you can see the sidebar div which should look like this..

    <div id="sidebar" style = 'left: -20px;'>

    Go ahead and change it like this..

    <div id="sidebar" style = 'left: -0px; width: 200px;'>

    You can play around with the values until you get something you like.

    Posted 1 year ago #
  26. autreschine
    Member

    thx for the support Elliott!!

    Posted 1 year ago #
  27. autreschine
    Member

    Dear Elliott,
    one more detail, my blogroll is still on 2 columns and there is a gray line that should be on the right end of the sidebar, instead, it's on the left.... can you help me one more time?

    Attachments

    1. left_sibar.jpg (129.4 KB, 4 downloads) 1 year old
    Posted 1 year ago #
  28. Elliott
    Support

    If you add an "overflow: visible;" to your sidebar div like we did with the width then it will take care of the two columns.

    As for the gray line I cannot see it. If possible can you send us a link to your page?

    Posted 1 year ago #
  29. autreschine
    Member

  30. autreschine
    Member

    Hi Elliott,
    i've put the "overflow: visible;" in my sidebar div, but my blogroll list is still in 2 columns... if you go on my "Nos articles" page you will see the differences.

    thx a lot for your help!

    Posted 1 year ago #
  31. Elliott
    Support

    Try adding this line..

    .blogroll li { margin-right: 50px !important; }

    That will make them all fall into one column. Let us know if it works for you.

    Posted 1 year ago #
  32. askmaridee
    Member

    Hey, posting here because it has to do with the One Category Template Elliot put up in this thread. I am using that template on my site now and it works like a charm, the only thing I noticed is that in the breadcrumbs at the top of the page eventhough the category is set as whitepapers and it pulls correctly from that category, the bread crumbs still say Blog, is there anyway to change that so it pulls the Category name.

    it is correct on the main Category page Whitepapers

    http://grahamober.com/develop/wpinstall/white-papers/

    but on the single post it says blog

    http://grahamober.com/develop/wpinstall/2010/09/account-coordination/

    Thanks for your help!

    Posted 1 year ago #
  33. autreschine
    Member

    Dear Elliott,
    where exactly should I add the line? also, did you saw the gray line that I was talking about?

    thx again for your help!!

    Posted 1 year ago #
  34. Elliott
    Support

    Hello askmaridee,

    By default pages will list the page title in the breadcrumbs. If you want change this then open up the one category template and around line 146 you should see this..

    <?php
    $show_on_front = get_option('show_on_front');
    $page_on_front = get_option('page_on_front');
    	if ( (!$breadcrumb_disable) && ($show_on_front != 'page') && ($page_on_front != $blog_page) ) {
    		if (class_exists('simple_breadcrumb')) {
    			$bc = new simple_breadcrumb;
    			}
    		}
    ?>

    Go ahead and change it like this..

    Home / <?php echo get_post_meta($post->ID, 'template_breadcrumbs', true); ?>

    And then when you edit the page create a new custom field with a name of template_breadcrumbs and a value of whatever you want to appear in the breadcrumbs.

    Let us know if this works for you askmaridee.

    EDIT - Hey askmaridee, sorry I misunderstood you. Which version of inFocus are you using? I checked this on my local setup with inFocus 1.6 and I was not having this issue.

    @austrechine, anywhere inside /wp-content/themes/infocus/style.css is fine.

    Posted 1 year ago #
  35. askmaridee
    Member

    I am unsure what version I am using, how would I find that out?

    Posted 1 year ago #
  36. Elliott
    Support

    You can view which version you are using by logging into Wordpress and navigating to Dashboard -> Appearance -> Themes.

    You can see the version under the inFocus theme. It should say something like inFocus 1.6 by WebTreats.

    Posted 1 year ago #
  37. askmaridee
    Member

    oh GRRRR, 1.5 is my version so what is my work around? lol

    Posted 1 year ago #
  38. Elliott
    Support

    Alrighty, not sure if this will fix the breadcrumb issue or not but it is always best to have the lastest version.

    First create a backup of your inFocus theme folder, /wp-content/themes/inFocus/ in case something goes wrong or you have made customizations.

    Next download the latest verion of inFocus from themeforest. Currently 1.6 is the latest version. Then upload it to /wp-content/themes/ and test it out to see if everything looks okay.

    If something went wrong then just copy and paste your backup of 1.5. Let us know if this fixes your breadcrumbs.

    Posted 1 year ago #
  39. askmaridee
    Member

    I think I have customized way too many files to try and upgrade successfully so I guess I'll end up hard coding it somehow.

    Posted 1 year ago #
  40. Elliott
    Support

    Here is the breadcrumb.php file from 1.6. Not sure if this will work for you but you can try..

    Create a copy of your theme folder before trying.

    Download and extract to /wp-content/themes/inFocus/lib/classes/

    If it does not work as expected then revert to your backup.

    Attachments

    1. breadcrumb.zip (1.6 KB, 5 downloads) 1 year old
    Posted 1 year ago #
  41. dchao90
    Member

    Elliot, could you tell me what lines I would have to edit if I do not wish to have a sidebar on the new blog page?

    Posted 1 year ago #
  42. eodesign
    Member

    Did the breadcrumb issue get resolved? I am using the latest version of inFocus. I have created the one category page named testimonials that pulls only from posts with the category testimonial. In the breadcrums for the testimonial post it reads:
    Home / Blog / Crossfit Testimonial

    it should be

    Home/ Testmonials/ Crossfit Testimonial

    Thank you!

    Posted 1 year ago #
  43. Elliott
    Support

    Hello dchao90,

    Which theme are you using?

    Posted 1 year ago #
  44. dchao90
    Member

    I'm using the Awake theme.

    Posted 1 year ago #
  45. Elliott
    Support

    Open up the file and at the end you should see this..

    <?php if($get_template == 'template-full.php') { echo '</div></div>'; }else{ get_sidebar(); } ?>

    Go ahead and change it to this..

    </div></div>

    You might also want to take a look at line 23..

    <div id="main">

    And add a width to it..

    <div id="main" style = 'width: 900px;'>

    @eodesign, which theme and version are you using?

    Posted 1 year ago #

Reply »

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme