Forum Replies Created

Viewing 12 replies - 46 through 57 (of 57 total)
  • Thread Starter lgehrig4

    (@lgehrig4)

    Thanks @brothman01. I actually worked it out with javascript (see post above yours), but I did try your option 1 and it did not work

    Thread Starter lgehrig4

    (@lgehrig4)

    Was 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');
      }
    }
    Thread Starter lgehrig4

    (@lgehrig4)

    The 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.
    Thread Starter lgehrig4

    (@lgehrig4)

    Thanks 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.

    Thread Starter lgehrig4

    (@lgehrig4)

    Corrected 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

    Thread Starter lgehrig4

    (@lgehrig4)

    Found 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');
    Thread Starter lgehrig4

    (@lgehrig4)

    Thanks @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);

    Thread Starter lgehrig4

    (@lgehrig4)

    Thank you @jakept , got then working

    Thread Starter lgehrig4

    (@lgehrig4)

    thank you corrinarusso! It was in the first link

    ‘taxonomies’ => array( ‘category’ )

    Thanks to everyone who replied

    Thread Starter lgehrig4

    (@lgehrig4)

    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.
    Thread Starter lgehrig4

    (@lgehrig4)

    Thank you!

    Thread Starter lgehrig4

    (@lgehrig4)

    Thank you Joy and James! This is very helpful

Viewing 12 replies - 46 through 57 (of 57 total)