-
Showing posts by category in sidebarViewing 9 posts - 1 through 9 (of 9 total)
-
December 10, 2014 at 3:34 pm #3080
Hi! I want to show posts from a specific category in the sidebar. I have created a sidebar under Appearance > Theme Options and saved it. Under Appearance > Widgets found the sidebar, tried to add different widgets to it. Haven’t found any CF widget that does this sort of thing, so I tried the ordinary WP widgets first – and here’s another strange thing, some of them show on page, som doesn’t show. Whatever I do on this installation everything seems to have a delay and/or not showing. Changing the header makes me have to save the options like ten times and then wait for five minutes before the update shows. Also, changing sidebar on a pages dropdown (where you choose what sidebar to show, “Custom sidebar”) doesn’t apply. Very weird.
Anyhow, last option I tried was CF Shortcode Widget, finding the correct shortcode on wordpress.org/support. Doesn’t show either. How do I solve this? I would also like to display a category archive, with possibility to show them with the oldest first.
And, another question. I want to have a sidebar on our blog page. Followed the instruction from another thread here, by choosing “Custom sidebar” on the page designated for the blog. It doesn’t show.
Please, help. If you need login etc just tell me, and I’ll fix it for you.
December 14, 2014 at 10:26 am #3096Hello Webbevakning,
Sorry for a terribly late response,
To display a specific category in the sidebar, you’ll have to apply a small edit to a file.
Navigate to wp-content/themes/circleflip/widgets/recent_post_widget.phpEdit the file recent_post_widget.php
find line: 59
Where$args = array(
‘post_status’ => ‘publish’,
‘post_type’ => ‘post’,
‘order’ => ‘DESC’,
‘posts_per_page’ => (int) $latest_count,
);Add to the array the category argument like so:
$args = array(
‘post_status’ => ‘publish’,
‘post_type’ => ‘post’,
‘order’ => ‘DESC’,
‘posts_per_page’ => (int) $latest_count,
‘category_name’ => ‘health’,
);Of course you will have to replace the category name ‘health’ with your selected category’s slug.
December 14, 2014 at 10:32 am #3097Regarding the delay you’re experiencing I can’t think of anything other than your servers resources, I suspect it’s php memory allocated.
Try the following remedy by adding the following two lines to your wp-config.php found at the root of the WP installation.define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
define( ‘WP_MAX_MEMORY_LIMIT’, ‘256M’ );If this still shows you problems and would like us to take a look for you, please include a Temporary admin access and FTP access to the WordPress installation.
The CF Shortcode Widget, should work with any shortcode registered, please try a Contact Form 7 Shortcode as a test, and let me know any non-working shortcodes and we’ll test them out as well.
I’ll need the access to check out the Blog Sidebar for you, please include which sidebar you would like to show and the page name or url.
Cheers.
December 16, 2014 at 2:03 am #3142This reply has been marked as private.December 16, 2014 at 2:13 am #3143This reply has been marked as private.December 16, 2014 at 3:27 pm #3147Hello Webbevakning,
Let me just start with “I love your choice of colors and great quality images”
I’ve set the side bar for you on the Acitivists post
Steps I did:
From Appearance >> Theme Options >> Pages Settings >> Posts Page
I checked the “Use settings from each post separetly (found in the meta box)” to allow each post to have it’s own sidebarFrom Posts Edit
I selected the side bar “Activists”
Which in Appearance >> Widgets
I added “CF Recent Posts” which I modified to now accept “category ID”I am still checking the blog page sidebar ans will update you soon.
** new recent posts widget with category option will be available on next update
RegardsDecember 29, 2014 at 2:02 pm #3224This reply has been marked as private.December 30, 2014 at 3:19 pm #3255Hello again,
Hope you had a nice holiday 🙂
I understand better now, thanks for explaining.
I’ll explain this in steps hoping that it makes it more readable.
the below example is for your journalists category1- Create a sidebar from theme options (for example named: journalists)
2- Add “CF Recent Posts” for the side bar on the widgets page
3- Set the category to 6 (you can find the category ID by editing the category itself at Posts >> Category)*
4- Edit the “Journalists” page, select side bar “journalists”
** category id will be found on the url, something like
http://mydomain.com/wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=6&post_type=postThat’s it for pages, for the posts you can set it using the theme options
1- Navigate to Appearance >> Theme Options >> Pages Settings >> Post Page
2- find “Post side Bar Settings”
3- select “Use global values set here (This will override meta post settings)”
4- Choose your layout and sidebar, for example “blog”
5- in widgets, add “Recent Posts” widget to the sidebarThat’s all, please let me know if you need any help.
Happy new year 🙂December 30, 2014 at 5:05 pm #3260This reply has been marked as private. -
You must be logged in to reply to this topic.