lgehrig4
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Need Help getting links to open in new tabThanks @brothman01. I actually worked it out with javascript (see post above yours), but I did try your option 1 and it did not work
Forum: Fixing WordPress
In reply to: Need Help getting links to open in new tabWas hoping I could find a built in way but I ended up using JS
window.onload = function(){ let anchors = document.getElementsByClassName('aux-button'); for (let i=0; i<anchors.length; i++){ anchors[i].setAttribute('target', '_blank'); } }
Forum: Fixing WordPress
In reply to: Need Help getting links to open in new tabThe site has been around for a while and I’ve only currently been making updates. The theme is Phlox Child if that matters. I’m not building the portfolio, just added additional items.
For this I go to portfolio > new and then add the information. For URL in question I just enter it into a field called ‘URL for Launch Button’ but there are no other options for this field. I don’t know where the HTML or CSS for this page is coming from.
For the other stuff I’m doing I use Elementor Pro, but when adding these portfolios I use the block editor. I have the option to edit the portfolio with Elementor, but when I try I can only touch the header and footer.
There are quite a few of these portfolios and I would love to make a global change to make these urls open in a new tab.
edit: I justs checked the Phlox docs and this is a Phlox porfolio. Can’t find what I’m looking for though
- This reply was modified 4 years, 7 months ago by lgehrig4.
Forum: Fixing WordPress
In reply to: Custom Menu Not UpdatingThanks for the reply. I deleted the post and menu item then re-entered them and now it works but I don’t know what was happening before.
Little confused about the Settings -> General part, because I don’t see a Blog Page option when go there.
Forum: Fixing WordPress
In reply to: Querying by post categoryCorrected that thanks. That was just a response I found on another thread asking the same question so I don’t fully understand what it all means. I just replaced the categories with mine.
That said I spoke too soon. After including this code the posts from my custom post page displayed together by category when the category was clicked. However, the posts from the other post page (wordpress default or whatever you call it) stopped working when a category was clicked. Fixed one post page and broke the other.
Back to square one
Forum: Fixing WordPress
In reply to: Querying by post categoryFound this issue. I had to register the categories for the custom posts. I can see where this would be a problem if this was going to be a real production site. You wouldn’t be able to add new categories in the dashboard.
This was the fix for my situation
function my_query_post_type($query) { if ( is_category() && ( ! isset( $query->query_vars['suppress_filters'] ) || false == $query->query_vars['suppress_filters'] ) ) { $query->set( 'post_type', array( 'invest', 'Advisors', 'Cryptocurrencies', 'Derivatives', 'Equities', )); return $query; } } add_filter('pre_get_posts', 'my_query_post_type');
Forum: Fixing WordPress
In reply to: Querying by post categoryThanks @joyously. I don’t think it helped in this case but this is someone that I wasn’t aware of that I’m sure will come in handy.
This is the only error in the log
[12-Jun-2020 00:42:39 UTC] PHP Warning: Use of undefined constant all – assumed ‘all’ (this will throw an Error in a future version of PHP) in /Applications/MAMP/htdocs/wordpress2/wp-content/themes/theindependentinvestor/functions.php on line 8
This is the line that it’s referring to which is only for the styleheet
wp_enqueue_style('style', get_stylesheet_uri(), NULL, microtime(), all);
Forum: Developing with WordPress
In reply to: Help me understand wp_head()Thank you @jakept , got then working
Forum: Developing with WordPress
In reply to: How do I add post ‘category to a custom theme?thank you corrinarusso! It was in the first link
‘taxonomies’ => array( ‘category’ )
Thanks to everyone who replied
Forum: Developing with WordPress
In reply to: How do I add post ‘category to a custom theme?This is all new to me so perhaps I’m just explaining it incorrectly. This is also just a learning experience. I don’t need this site for anything. Let me add what I hope will be some clarity.
1. We originally created the site using just plain HTML, CSS and JS files.
2. Next I created a wordpress (instance you call it?) locally using MAMP.
3. Right now we are starting to create the wordpress pages, but have not moved the orignal design code over yet.
4. When I created the wordpress instance there was already a posts category.
5. The instructor created a 2nd ‘project’ page but where I went off was that I want two post pages, each with a completely different topic of posts. The topics on each of those pages will have categories within the topic.So whether or not this really makes sense I would like to know the code for adding a ‘categories’ option, just like I was able to add images, excerpts etc.
So even if this is not the best way I would still like to know how it is done. Can anyone look at the code I posted and tell me how to add a ‘categories’ section?
edit: I’ll check out those links posted above
- This reply was modified 4 years, 9 months ago by lgehrig4.
Forum: Fixing WordPress
In reply to: create form with document upload abilityThank you!
Forum: Fixing WordPress
In reply to: Setting up Database for SiteThank you Joy and James! This is very helpful