semperaye
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Help Creating a Post Category ShortcodeUpdate: Ok so the only way to get my site back up was to disable the php snippets plugin, this means I’ll lose all my snippets…. I should have backed them up 🙁 Using an older version of the plugin files didn’t work… IDK what to do now.
Namecheap told me “they are unable to find the specified code, that was pasted and 500 error happened after that, within my hosting account’s files.” I can only give them a copy of the php code. I’m trying to have them restore the site back a few days, because the only image I have is from months ago (my bad).
Forum: Developing with WordPress
In reply to: Help Creating a Post Category ShortcodeHmmm this seems to have caused an error 500. I’m going to look into this and get back to ya, ty!
/wp-content/plugins/code-snippets/php/snippet-ops.php(353) : eval()’d code on line 10
Forum: Developing with WordPress
In reply to: Help Creating a Post Category ShortcodeSorry for my ignorance to all of this, but where in the html do I place the
"<a class=\"sa-cat-links\" href=\"$url\">{$cat->name}</a>";I’m assuming I don’t need the $html{}=?<h1 style="text-align: center;"><span style="color: #ffffff;"><strong>[field title]</strong></span></h1> <p style="text-align: center;"><span style="color: #ffffff;">[sa_post_cats]<span style="font-size: 16px; color: #ffffff;"> • [field author] • [field date] • <a style="color: #ffffff;" href="#comments">[comment_no] Comments</a></span></span></p>I tried a few things but I must be doing it wrong 😛
Forum: Developing with WordPress
In reply to: Help Creating a Post Category ShortcodeHi!
Well it looks like we finally got it working! The only issue I had was that I couldn’t style to hyperlink. I had to use custom css.
.fl-module-content a, .fl-module-content a:hover, .fl-module-content a:focus { color: #ffffff; text-decoration: none; }I’m not sure if this custom css is actually best though, because I think it’s targeting all of my Beaver Builder content links…. Is there a way to target just the sa_posts_cats shortcode with css?
Thank you for all your assistance!
Forum: Developing with WordPress
In reply to: Help Creating a Post Category ShortcodeHi the text is all one one line now, but I am not able to make the entire thing white & centred. I’m using other shortcodes so I don’t think the above is possible. Here is what I’m looking at inside the text editor:
<h1 style="text-align: center;"><strong>[field title]</strong></h1> <p style="text-align: center;">[sa_post_cats] <span style="font-size: 16px;">• [field author] • [field date] • <a href="#comments">[comment_no] Comments</a></span></p>Forum: Developing with WordPress
In reply to: Help Creating a Post Category ShortcodeHello again 🙂
This is what I’m seeing in incognito with cache flushed:
I’m trying to make one line, centered.
Forum: Developing with WordPress
In reply to: Help Creating a Post Category Shortcodebcworkz,
Hello again 🙂 Thank you for all this information, especially in explaining the span issue, I think I figure that part out. However, the css didn’t work to fix the positioning of the categories text 🙁 I tried to fool around with it but couldn’t get it to work.
Forum: Developing with WordPress
In reply to: Help Creating a Post Category ShortcodeCool it works…but ya the positioning issue is still there, and the picture of the file icon to the left of the text. Additionally it’s changing the rest of the text css next to it black 😛 I added the sa_ but it didn’t change anything.
Please see this test post:
https://www.seosemper.com/test-post/I never realized this was so complicated, but I guess thats why none of the shortcode plugins for WP had the clickable categories as a feature.
Thank you for all the help!
No need, but thank you for the reply. The bug was with Generate Press’s legacy hooks plugin. After I updated and migrated to their new Elements plugin the issue resolved itself.
UPDATE!
Sorry to bother you with this because it just so happens the bug was with Generate Press and not BB or even UABB. An update and migration to their new Elements hooks premium plugin fixed it. Thank you!
Hi Ben,
Thank you for the reply!
I’m using Generate Press Hooks in the “after the footer widgets”, [fl_builder_insert_layout slug=”footer-menu”]. Upon further investigation I noticed that if I disabled the 3rd party BB plugin app UABB, the issue went away. I’m in the processes of upgrading my UABB license so that I can get support because apparently the support expired too 😛
Do you think I’m right that it’s UABB interfering somehow? Or?
Thanks!
Forum: Developing with WordPress
In reply to: Help Creating a Post Category ShortcodeHello again bcworkz,
Thank you for taking time to help me with this. I was able to remove the “filed under:” text, thank you 🙂 Unfortunately the 2nd code to make it clickable didn’t work, it just created a file icon in place of the category text and merged everything to the left.
Forum: Developing with WordPress
In reply to: Help Creating a Post Category ShortcodeHi bcworkz,
That code worked! I don’t suppose there is a way to filter out the text “filed under:”? Right now the code outputs “Filed Under: Uncategorized”
Thank you for this. None of the shortcode plugins could do this!
My ultimate goal is to have the category clickable to pull up all posts in that category.
Forum: Developing with WordPress
In reply to: Help Creating a Post Category ShortcodeNote: In my original post I used the wrong code (IDK where I got that other one from haha). It’s actually the following thats working for my comment count:
add_shortcode( 'comment_no', 'commno' ); function commno(){ $number= get_comments_number(get_the_ID()); return $number; }I just tried to edit it with the code you provided, but in reality IDK what I’m doing 😛
Forum: Developing with WordPress
In reply to: Help Creating a Post Category ShortcodeHi bcworkz,
Thank you for the reply! Here is what I came up with… IDK if I am close or not:
add_shortcode( 'category_type', 'categories' ); function categories(){ $cats = wp_get_post_categories( $post_id, ['fields'=>'names']); return 'Filed under: ' . implode( $cats, ', '); }[category_type]
It returns “Filed Under:”
Maybe I’m missing something?