omnijh
Forum Replies Created
-
Forum: Plugins
In reply to: [Posts per Cat [Unmaintained]] How to add the Author's "Display Name"Forum: Plugins
In reply to: [Posts per Cat [Unmaintained]] dateSorry for incorrect placement of code quotes..
code starts at ” //extract ” obviously
Forum: Plugins
In reply to: [Posts per Cat [Unmaintained]] dateHi there, I've managed it. After extracting post title just add this if you want it to be after a line break (adjust to your own needs) //extract meta data : author name / date of publication $ppc_author = $post->post_author; // extracting author of post $ppc_postdate = $post->post_date; // post date $ppc_author_first_name = get_the_author_meta( user_firstname, $ppc_author ); //first name through ID $ppc_author_last_name = get_the_author_meta( user_lastname, $ppc_author );// last name through ID $ppc_str .= '<p class="meta-info">'.By.' '.$ppc_author_first_name.' '.$ppc_author_last_name.' '.'—'. mysql2date('F jS, Y', $ppc_postdate) .'</p>';
This outputs author name in a nice way + date
Don’t thank me..
Thank you urkekg for getting me to write php – never done it before ??
Forum: Fixing WordPress
In reply to: Author display name inside the loop ?Haaa
I think this will be useful to some.. I managed it after a good night of sleep (sort of)
//extract meta data : author name / date of publication $ppc_author = $post->post_author; // extracting author of post $ppc_postdate = $post->post_date; // post date $ppc_author_first_name = get_the_author_meta( user_firstname, $ppc_author ); //first name through ID $ppc_author_last_name = get_the_author_meta( user_lastname, $ppc_author );// last name through ID $ppc_str .= '<p class="meta-info">'.By.' '.$ppc_author_first_name.' '.$ppc_author_last_name.' '.'—'. mysql2date('F jS, Y', $ppc_postdate) .'</p>';
Enjoy !
Forum: Fixing WordPress
In reply to: Author display name inside the loop ?I’m getting somewhere..
$ppc_author = $post->post_author; $ppc_str .= '<p class="meta-info">'.$ppc_author.'</p>';
this will return what i think is author ID but i don’t know how to extract nice_username from it…
Somebody please help ?
Forum: Fixing WordPress
In reply to: How To Add Custom Header For Specific Category And Posts?Hey Shan,
to change your category archive page just copy your index or home.php content
create a new php page and call it category-(insert specific category slug here).php
Paste the content of your home into this page and change the header logo to suit your needs
( find the logo div or which ever part that needs to be customized and go for it )I’m guessing the post page has the same hierarchy.
check template hierarchy and the “what template part is used ?” in this page
Hope it helps
Forum: Plugins
In reply to: [Posts per Cat [Unmaintained]] dateHello lef_DR
Have you found an answer to your question.. ?
Forum: Plugins
In reply to: [Posts per Cat [Unmaintained]] How to add the Author's "Display Name"I’ll be very interested in such a costumisation as well.
I have never really put a finger in plug in coding so I have no idea where or what to put to extract Display Name and Date…
I know it should be a modification in wp-postspercat.php but that’s where my knowledge ends.
Can someone put us on the trail/track ? ( urkekg maybe ? ^^)
hey alexcastro
did you manage to sort this out ??
very very interesting topic and useful to most of us i reckon..Forum: Plugins
In reply to: Different header image (not random) for each category?hi
I’m trying to figure out how to have a simple header with just an image per category contained in it.. i thought i found the answer here.. but it doesnt seem to work
https://www.femalepleasure.org/multitest/betabang/?cat=5
i obviously also implemented the div(s) in my css but it wouldnt show
I don’t see what i did wrong.. can someone help please?
it would be such a relief !
thanks !Forum: Fixing WordPress
In reply to: Show subcategories only for selected category@karl 19 and carl-johan
I managed it with the code you suggested Karl19.. yet i experience exactly the same problems as you do : I’d like it not to show on ‘front page’ and would like to get rid of the no categories mention.
But it is definitly what we were after. Thanks for this one Karl !Now what I am trying to do is to add title_description as text next or under each subcategory.. and am such a beginner I can’t seem to find how to implement such function to the above code..
<?php echo category_description( $category ); ?>
I’m trying to get this line to fit inside the code Karl kindly shared here :
<?php if (is_category()) { $this_category = get_category($cat); } if($this_category->category_parent) $this_category = wp_list_categories('orderby=id&title_li=&child_of='.$this_category->category_parent."&echo=0"); else $this_category = wp_list_categories('orderby=id&title_li=&child_of='.$this_category->cat_ID."&echo=0"); if ($this_category) { ?> <ul> <?php echo $this_category; ?> </ul> <?php } ?>
but i can’t seem to find the proper syntax…
Would be awesome if someone could help out figuring how to insert the descriptions bits
thanks in advance for any further help