Forum Replies Created
-
Same principle then, wp_insert_post() creates either a post or a page along with any post/page meta required but you did refer to ‘pages’ however I’m likely not following exactly how this is all working.
First port of call would be the WP codex function reference and a hunt for whatever functions exist for authors, somewhere there is code that is asking how many posts the user has authored? and if > 0 show something actually looking at author.php it queues the wp loop to be able to see if a user has created any posts. I think perhaps more what you want to be doing is to to force create a page for that user if one doesn’t exist using user name to name the page then you can do a !get_page_by_title(‘user_name’) wp_insert_post() you could also then add detail to the page via content parameters in the create post/page array.
In reply to: Buddypress.org Features ThemeIt’s not really that much different? I doubt it’s a good idea to use an older default theme with later BP versions the two will not be compatible
Examine your browser source code that should show the new classes applied to the list elements of the activity stream ul.
You should or want to see a class of odd or even but last after a few others that are generated and there must be a space between class tokens (words/strings) that is why the instruction to include the space required in the PHP code ‘ odd’ rather than ‘odd’
Your example should work it’s the same as mine but you need to use the css ruleset I showed above or something similar there’s nothing really I can paste up that would help further – have you got your theme running live anywhere to look at?
In reply to: Buddypress.org Features ThemeIt’s basically the default theme but probably an early 1.2 version.
Couple of things: first you need the space as mentioned bit earlier ‘ odd’ ‘ even’ second I notice some backticks in the pastebin code that’s probably fromm trying to paste the code into the forum fist but just make sure that those backticks don’t exist in the real source code.
You should be seeing a new class on the li elements? Where are you actually looking for results? you initially will not see any styling as all this does is place a class and you will then need to style that class: pseudo example #activity-stream li.odd {background: red;}
You won’t be using this to style with : :nth-child(odd)
How are you checking the elements for the generated / printed class? Firebug will let you see the markup as output to browser.
The pastebin code looks ok!
@nit3watch
Hmm working for me. Just tested on a 1.3 test install. line numbers need disregarding or at least using as a very rough pointer to the area, line numbers have changed even more in 1.3.One thing that needs doing is where there is an instance of ‘odd’ or ‘even’ those need to become ‘ odd’ ‘ even’ i.e they need white space before the first letter in order to ensure that the class prints out as a valid syntactical class group:
class=”groups new_forum_topic odd”If it’s still not working paste up your file showing pertinent lines, this is a very simple approach so shouldn’t run into problems.
I would also make one other change and that is to rename $class as that is rather generic and open to clashing with another of that name change it to something like $stripe_class
In reply to: [Resolved] – How to get two separate menusthose damned pesky shift keys
In reply to: [Resolved] – How to get two separate menus? did you change a bp-default file or do as pointed out earlier and make a child theme?
If you didn’t do so move your edited file to the child theme and either replace the original from the archive file or not worry as it doesn’t need to be there and an update will place a fresh copy anyway
In reply to: [Resolved] – How to get two separate menusTry changing:
“
to
“
In reply to: [Resolved] – How to get two separate menusIt can help to add extra spacing i.e carriage returns between those elements to make it visually easier to read and follow the flow of your Ifs and endif’s
In reply to: [Resolved] – How to get two separate menusYou just have a mis-matched if / endif you’ll need to work through the code to find out where that occurred, it’s not necessarily that actual line that has the issue but just where it first runs into it being an issue.
It’s hard to tell what you have done wrong without being able to see the code really.
In reply to: [Resolved] – How to get two separate menusYou do this in a child theme, please see the BP codex for guidance on how to create a child theme (easy!)
https://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/Mercime has shown you how and where it’s not really php coding it’s a matter of copy pasting .
In reply to: New theme – Buddypress UX@Nit3watch I re-factored the link in this thread:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/css-trick-how-to-style-activity-stream-odd-and-even-posts/
To locate the post I made with snippet and also pasted into the thread above, it may help?Added this snippet fro a while back from the link above it might be useful, but also I posted this over a year ago so may contain inaccuracies:
`
In file bp-themes/bp-default/activity/activity-loop.phpadd line ‘’ above line 20 ‘’
Immediately below the while loop on line 20 add:
‘’
To print out the odd or even classes go to the file:
bp-themes/bp-default/activity/entry.php
And add :
‘’ to line 5 so it looks like:
‘<li class=” ” ‘
You can then style the classes ‘odd’ and ‘even’ as you wish.
`I take it all back permalinks are lovely

Hand crafted a new link, obvious really

jQuery, it’s how striping was/is achieved for the other various tables / lists dotted around the app.
In fact I’m sure I showed how a month or two back along with enqueue function to add your own JS snippets file.
EDIT// just spotted my earlier remark in this thread oh well so much for permalinks then, side splittingly funny that
In reply to: New theme – Buddypress UXTurn on debugging, as I spotted a few deprecated functions pop up in warnings.
Uploading to repo is probably best slowed down it’s tempting to upload at every change but it’s inevitable that the quicker you rush to upload the more likely the second after you realise you forgot to change version numbers and a hundred other little things
In reply to: New theme – Buddypress UXThe fact that the sidebars may vary in length as well as the centre content makes life harder overlapping borders works but will still result in an apparent miss-match if one sidebar is longer than the other as is the case presently. Really your only two options are using a graphic (create a border take a slice of it of a few pixels but not too few 10 or 2 wide by ~20 high add an extra div as a child of the main #content / #container (parent that wraps content and sidebars) and then you add a background to each of these two divs and use position to place the graphic in from the edges by the sidebar width alternatively you could try a technique that can work but also can lead to issues depending on the layout: give the sidebars a huge amount of bottom padding, then an equal amount of negative bottom margin and overflow hidden on the parent element rn the borders on the sidebars rather than the center element.
In reply to: URGENT – How To Set Default Values?Slightly early to be bumping. Generally please wait ~24 hours mas o menos
when you say activity filter you do mean the select dropdown? as I thought that defaulted to ‘No Filter’ or do you mean the actual sub nav tabs in which case you will need to run filter function of some description to remove or re-order default tab
In reply to: New theme – Buddypress UXfix a issue where by if the content area is ’shorter’ than the sidebars ( being ‘taller’ from widgets ), the content boarder breaks.
Research Faux columns for backgrounds running full height and overlapping borders using negative margins to create the illusion of a full height single borders.
What’s the issue with stripping and IE?
I trust that the ‘screw this’ chap has requested a full refund
In reply to: No Admin Bar or any other sign of BP on website page@mercime Blame it on the backticks, bad workman blames…

Off to posts a forum alert “mercime is logged in , would all users kindly take caution when posting and if they can’t find their post later please search at random through the last 100 threads”
In reply to: No Admin Bar or any other sign of BP on website pageI’m going to edit post #96127 haven’t a clue what it may be about as it hasn’t been posted yet
In reply to: No Admin Bar or any other sign of BP on website page@mercime 😆 not having a good day all in all
Think we’d better post a sticky just warning people that if their posts appear to start jumping around random threads not to panic it’s just mercime having a little ‘re-arranging of the furniture’ session
In reply to: No Admin Bar or any other sign of BP on website page@gregfielding did you post in the wrong thread ?
