Tagged: x
-
AuthorPosts
-
January 30, 2017 at 12:52 am #1350340
blissmarketingParticipantHey
I have had a look through some of the forum answers but wasn’t sure if the .single code would apply to how we have the posts set up
On our site we have the regular blog posts (which we like the sidebar on )
Then we have another category set up called ‘publicity’ Which has all our publicity which we imported from our old wordpress site… thing is these imports have imported as ‘articles’ al be it in a seperate categoryThing is we don’t wish to have the sidebar on any of the publicity listings. Would this be possible? Or would I need to go through each individual publicity post and change?
Log in info in next message
Jen xJanuary 30, 2017 at 12:52 am #1350341
blissmarketingParticipantThis reply has been marked as private.January 30, 2017 at 12:53 am #1350342
blissmarketingParticipantimage
January 30, 2017 at 12:56 am #1350344
blissmarketingParticipantI have just realised from being in essential grid they have registered as articles?
Would this mean they are different to blog posts?
January 30, 2017 at 1:03 am #1350348
ChristopherModeratorHi there,
I don’t find the category publicity in your site, please provide us with category URL. Currently your site displays default sidebar. Please add widget to your custom sidebar such as ‘custom’ or ‘facebook’ sidebars and assign sidebar to pages/posts.
Hope it helps.
January 30, 2017 at 1:20 am #1350362
blissmarketingParticipantHey Chris
It is on the screenshot above URL – http://oak.blisssanctuaryforwomen.com/wp-admin/edit.php?post_type=publicity
So how would i not have a sidebar on these publicity posts
or is there a way to remove the blog sidebar too and like you said i will just add custom to the blog sidebar (a recent posts sidebar etc)
Jen
January 30, 2017 at 1:55 am #1350386
Paul RModeratorHi,
To remove sidebar on publicity posts, you can add the code below in your child theme’s functions.php file.
function publicity_layout($contents) { if ( get_post_type() == "publicity") { $contents = 'full-width'; } return $contents; } add_filter('x_option_x_layout_content', 'publicity_layout');Hope that helps.
January 31, 2017 at 5:17 am #1352087
blissmarketingParticipantAmazing – that worked perfectly – thankyou so much!!!!
Is there also a way tha tthe featured image could not be shown on the main post of all the publicity posts too please?
Would that be php or css
Thanks so much again xxxxxx 🙂
January 31, 2017 at 5:39 am #1352123
blissmarketingParticipanti managed to sort the featured images out 🙂
is there a way to remove the date from blog posts / articles?
and also on the main blog posts the sidebar still shows even though i have set to full pageCan i use the code below also for the main blog posts please? what would i change ‘ publicity too?
function publicity_layout($contents) {
if ( get_post_type() == “publicity”) {
$contents = ‘full-width’;
}return $contents;
}add_filter(‘x_option_x_layout_content’, ‘publicity_layout’);
January 31, 2017 at 6:29 am #1352166
ThaiModeratorHi There,
Please try with this code:
function publicity_layout($contents) { if ( get_post_type() == "publicity" || is_home() ) { $contents = 'full-width'; } return $contents; } add_filter('x_option_x_layout_content', 'publicity_layout');After that add the following CSS under Customizer > Custom > Global CSS:
.single .p-meta { display: none; }Hope it helps 🙂
January 31, 2017 at 9:50 pm #1353146
blissmarketingParticipanthey 🙂
That is the same code? for the main blog posts would it still say publicity? im confused lol
January 31, 2017 at 9:53 pm #1353150
blissmarketingParticipantiv used the
.single-post .entry-featured {
display:none;
}But blog post featured images still showing? see attached image
February 1, 2017 at 2:50 am #1353354
Paul RModeratorHi,
We added is_home in the conditional statement.
if ( get_post_type() == "publicity" || is_home() )With regards to featured image, the code should work.
Can you provide us the exact url of that post page.
Thanks
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1350340 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
