OrignalCeiling
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: if “custom post type” display thisI figured out a simpler way to do it!
add_action ('the_title' , 'endangered', 10, 2); function endangered($title, $id) { return 'post' === get_post_type($id) ? '<div>Endangered:</div> ' . $title : $title; } add_action ('the_title' , 'awards', 10, 2); function awards($title, $id) { return 'awards' === get_post_type($id) ? '<div>Awards:</div> ' . $title : $title; }
I just added this to functions and POOF! Thank you for your help!
Forum: Fixing WordPress
In reply to: if “custom post type” display thisThank you for the reply, this sounds what I am looking for, but I do not know how to turn that into the right code… Any further code you can provide? Thank you in advance! I think this will do the trick.
Forum: Plugins
In reply to: [Custom Post Type UI] If in_category function for Custom TaxonomiesThank you for your reply! I figured it out before I saw this and the way it is supposed to look is as follows:
<?php if ( has_term( 'hotelmotel', 'class' )) { ?> • <a href="https://abandonedar.com/type/jail/">Hotel/Motel</a> <?php } ?> <?php if ( has_term( 'Church', 'class' )) { ?> • <a href="https://abandonedar.com/class/church/">Church</a> <?php } ?>
There was a pesky semi-colon that screwed everything up. I appreciate the additional help!
Forum: Developing with WordPress
In reply to: If in_category function for Custom TaxonomiesYOU DID IT!!!! THANK YOU!
Forum: Developing with WordPress
In reply to: If in_category function for Custom TaxonomiesOk, I think we are onto something with the semicolon. Where is it supposed to go? Because with it there, it shows all terms, but when I delete it, it shows no terms even if one is selected. Hopefully that makes sense.
<?php if ( is_tax( 'Jail', 'class' )); { ?> • <a href="https://abandonedar.com/type/jail/">Jail</a> <?php } ?> <?php if ( is_tax( 'hotelmotel', 'class' )); { ?> • <a href="https://abandonedar.com/type/jail/">Hotel/Motel</a> <?php } ?>
= ? Jail ? Hotel/Motel (Only “hotelmotel” is checked)
<?php if ( is_tax( 'Jail', 'class' )) { ?> • <a href="https://abandonedar.com/type/jail/">Jail</a> <?php } ?> <?php if ( is_tax( 'hotelmotel', 'class' )) { ?> • <a href="https://abandonedar.com/type/jail/">Hotel/Motel</a> <?php } ?>
= ________
Thank you for your continued help.
- This reply was modified 3 years, 7 months ago by OrignalCeiling.
Forum: Developing with WordPress
In reply to: If in_category function for Custom TaxonomiesI just tried this too
<?php if (has_term('hotelmotel')); { ?> • <a href="https://abandonedar.com/type/church/">Hotel/Motel</a> <?php } ?> <?php if (has_term('church_class')); { ?> • <a href="https://abandonedar.com/type/church/">Church</a> <?php } ?>
Taking away the taxonomy, but it still shows both.
Thanks again for your help, I feel like it’s almost there!Forum: Developing with WordPress
In reply to: If in_category function for Custom TaxonomiesI just added “if” to the beggining at it is still not working.
<?php if (has_term('hotelmotel', 'class')); { ?> • <a href="https://abandonedar.com/type/church/">Hotel/Motel</a> <?php } ?> <?php if (has_term('church_class', 'class')); { ?> • <a href="https://abandonedar.com/type/church/">Church</a> <?php } ?>
How would I use
<?php the_terms(); ?>
if my context?
Thank you in adavance!Forum: Developing with WordPress
In reply to: If in_category function for Custom TaxonomiesHi! Thank you for your reply. I tried this out, but for some reason it is still wanting to print both Functions instead of just the one selected.
So I have under a post “hotelmotel” checked, but not “church_class”
with the code in my theme
<?php has_term('hotelmotel', 'class'); { ?> • <a href="https://abandonedar.com/type/church/">Hotel/Motel</a> <?php } ?> <?php has_term('church_class', 'class'); { ?> • <a href="https://abandonedar.com/type/church/">Church</a> <?php } ?>
and it displays: ? Hotel/Motel ? Church
“Class” is the Custom taxonomy
Any thoughts?
Thanks for getting back with me. I’m a little slow when it comes to this. How are you seeing this error? Is it View Page Source? I want to try and fix it, but View page source wasn’t showing this.
Thank you.
I currently am using them as a shortcode (Classic editor) and I have tried switching to the Photonic Gallery for standard, but that would take just as long to do as transferring to smugmug. Also, WP Galleries in Photonic load really slow for some reason.
Thank you, this is exactly what I ended up doing and it works like a charm!
I just ended up switching to SmugMug.
Forum: Fixing WordPress
In reply to: Transferred to new host, Same Domain ErrorFigured out WP Super Cache is causing this error. Also it says there is a line error on th custom_functions.php I use a heavily customized elegant themes theme.
That error line code says
$last_update->last_checked = time();
Any ideas? I’m no longer super cached, I am super confused…
Forum: Fixing WordPress
In reply to: Transferred to new host, Same Domain ErrorI would upgrade, but my current version of Next Gen gallery isn’t compatible with new versions… I hate Next Gen gallery’s update….
Also I have deactivated All my plugins and gone back to default theme… Errors still happen….
Forum: Fixing WordPress
In reply to: Transferred to new host, Same Domain ErrorYes, It is very sporadic… Sometimes it is 5 minutes, then 20. I’m soooooo lost!